aboutsummaryrefslogtreecommitdiff
path: root/include/DeviceCommunicationExceptions.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-10-21 00:11:56 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-10-21 00:11:56 +0200
commit0478c9ab21dace1618afd9872935adecd478ff8f (patch)
treed4005d9b7a93d4571978347af1774198ca956c79 /include/DeviceCommunicationExceptions.h
parent91f88b15f011abe85c85893d1fe50de6c8e4189d (diff)
downloadlibnitrokey-0478c9ab21dace1618afd9872935adecd478ff8f.tar.gz
libnitrokey-0478c9ab21dace1618afd9872935adecd478ff8f.tar.bz2
Fix compilation warning
Moved const to proper place Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/DeviceCommunicationExceptions.h')
-rw-r--r--include/DeviceCommunicationExceptions.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/DeviceCommunicationExceptions.h b/include/DeviceCommunicationExceptions.h
index 4dbd35d..1c77f5b 100644
--- a/include/DeviceCommunicationExceptions.h
+++ b/include/DeviceCommunicationExceptions.h
@@ -15,7 +15,7 @@ public:
DeviceCommunicationException(std::string _msg): std::runtime_error(_msg), message(_msg){
++occurred;
}
- const uint8_t getType() const {return 1;};
+ uint8_t getType() const {return 1;};
// virtual const char* what() const throw() override {
// return message.c_str();
// }
@@ -26,26 +26,25 @@ public:
class DeviceNotConnected: public DeviceCommunicationException {
public:
DeviceNotConnected(std::string msg) : DeviceCommunicationException(msg){}
- const uint8_t getType(){return 2;};
-
+ uint8_t getType() const {return 2;};
};
class DeviceSendingFailure: public DeviceCommunicationException {
public:
DeviceSendingFailure(std::string msg) : DeviceCommunicationException(msg){}
- const uint8_t getType(){return 3;};
+ uint8_t getType() const {return 3;};
};
class DeviceReceivingFailure: public DeviceCommunicationException {
public:
DeviceReceivingFailure(std::string msg) : DeviceCommunicationException(msg){}
- const uint8_t getType(){return 4;};
+ uint8_t getType() const {return 4;};
};
class InvalidCRCReceived: public DeviceReceivingFailure {
public:
InvalidCRCReceived(std::string msg) : DeviceReceivingFailure(msg){}
- const uint8_t getType(){return 5;};
+ uint8_t getType() const {return 5;};
};