From daf51e7e6a6f6569472f2a5fae5a376f105f858a Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 13 Jan 2017 10:51:14 +0100 Subject: Add const qualifier to functions Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 3 ++- include/NitrokeyManager.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 833e916..1753a73 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -614,7 +614,8 @@ namespace nitrokey{ return get_major_firmware_version() <= m[device->get_device_model()]; } - DeviceModel NitrokeyManager::get_connected_device_model(){ + DeviceModel NitrokeyManager::get_connected_device_model() const{ + //FIXME throw if no device is connected or return unknown/unconnected value return device->get_device_model(); } diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h index 6551c1a..e96ac22 100644 --- a/include/NitrokeyManager.h +++ b/include/NitrokeyManager.h @@ -40,7 +40,7 @@ namespace nitrokey { bool connect(); bool disconnect(); bool is_connected() const throw() ; - DeviceModel get_connected_device_model(); + DeviceModel get_connected_device_model() const; void set_debug(bool state); stick10::GetStatus::ResponsePayload get_status(); string get_status_as_string(); -- cgit v1.2.3