From a2da17c8608d25f64239047d0ff497adb015e411 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 8 Aug 2016 17:51:34 +0200 Subject: Moving to shared ptr for device Signed-off-by: Szczepan Zalega --- include/NitrokeyManager.h | 3 ++- include/device_proto.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h index be367fd..6fa096a 100644 --- a/include/NitrokeyManager.h +++ b/include/NitrokeyManager.h @@ -7,6 +7,7 @@ #include "stick10_commands.h" #include "stick20_commands.h" #include +#include namespace nitrokey { using namespace nitrokey::device; @@ -86,7 +87,7 @@ namespace nitrokey { static NitrokeyManager *_instance; bool connected; - Device *device; + std::shared_ptr device; bool is_valid_hotp_slot_number(uint8_t slot_number) const; bool is_valid_totp_slot_number(uint8_t slot_number) const; diff --git a/include/device_proto.h b/include/device_proto.h index 40b2a22..4044cdc 100644 --- a/include/device_proto.h +++ b/include/device_proto.h @@ -144,7 +144,7 @@ public: bzero(&packet, sizeof(packet)); } - response_payload & data(){ + response_payload & data() { return packet.payload; } -- cgit v1.2.1