Skip to content

Commit

Permalink
Fix -Wsuggest-override
Browse files Browse the repository at this point in the history
  • Loading branch information
SoapGentoo committed Aug 7, 2022
1 parent a9a8fd6 commit c8f3e0d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libnitrokey/CommandFailedException.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CommandFailedException : public std::exception {
LOG(std::string("CommandFailedException, status: ")+ std::to_string(last_command_status), nitrokey::log::Loglevel::DEBUG);
}

virtual const char *what() const noexcept {
virtual const char *what() const noexcept override {
return "Command execution has failed on device";
}

Expand Down
2 changes: 1 addition & 1 deletion libnitrokey/LongOperationInProgressException.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class LongOperationInProgressException : public CommandFailedException {
std::string("LongOperationInProgressException, progress bar status: ")+
std::to_string(progress_bar_value), nitrokey::log::Loglevel::DEBUG);
}
virtual const char *what() const noexcept {
virtual const char *what() const noexcept override {
return "Device returned busy status with long operation in progress";
}
};
Expand Down
6 changes: 3 additions & 3 deletions libnitrokey/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ namespace nitrokey {

class StdlogHandler : public LogHandler {
public:
virtual void print(const std::string &, Loglevel lvl);
virtual void print(const std::string &, Loglevel lvl) override;
};

class FunctionalLogHandler : public LogHandler {
using log_function_type = std::function<void(std::string)>;
log_function_type log_function;
public:
FunctionalLogHandler(log_function_type _log_function);
virtual void print(const std::string &, Loglevel lvl);
virtual void print(const std::string &, Loglevel lvl) override;

};

Expand All @@ -72,7 +72,7 @@ namespace nitrokey {
log_function_type log_function;
public:
RawFunctionalLogHandler(log_function_type _log_function);
virtual void print(const std::string &, Loglevel lvl);
virtual void print(const std::string &, Loglevel lvl) override;

};

Expand Down

0 comments on commit c8f3e0d

Please sign in to comment.