diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-09 18:49:24 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-11 15:41:45 +0100 |
commit | adbc664125142c434294bfa795666c90c7608429 (patch) | |
tree | 15db66af5acd4422b5e66678dbe45a953b9dbdb0 /include/command.h | |
parent | c69604e8ba099b1421af86c34d904b0b380f996c (diff) | |
download | libnitrokey-adbc664125142c434294bfa795666c90c7608429.tar.gz libnitrokey-adbc664125142c434294bfa795666c90c7608429.tar.bz2 |
Adjust for compilation on Visual Studio 2017
Building works however tests are not. Possibly linking with original hidapi solution would work.
Diffstat (limited to 'include/command.h')
-rw-r--r-- | include/command.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/command.h b/include/command.h index 0a875e4..fc374f7 100644 --- a/include/command.h +++ b/include/command.h @@ -28,6 +28,7 @@ namespace stick20{ template<CommandID cmd_id, PasswordKind Tpassword_kind = PasswordKind::User, int password_length = 20> class PasswordCommand : public Command<cmd_id> { + constexpr static CommandID _command_id() { return cmd_id; } public: struct CommandPayload { uint8_t kind; @@ -69,8 +70,10 @@ namespace stick20{ } __packed; - typedef Transaction<Command<cmd_id>::command_id(), struct CommandPayload, struct EmptyPayload> - CommandTransaction; + //typedef Transaction<Command<cmd_id>::command_id(), struct CommandPayload, struct EmptyPayload> + // CommandTransaction; + using CommandTransaction = Transaction<cmd_id, CommandPayload, EmptyPayload>; + //using CommandTransaction = Transaction<_command_id(), CommandPayload, EmptyPayload>; }; } |