Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
clang-tidy fix: [modernize-use-override]
Browse files Browse the repository at this point in the history
prefer using 'override' or (rarely) 'final' instead of 'virtual'
[modernize-use-override]
  • Loading branch information
j1elo committed Apr 3, 2018
1 parent 1f9398d commit 14b54ee
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
7 changes: 2 additions & 5 deletions server/loadConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ class ParseException : public virtual std::exception
public:
ParseException(std::string message) : message(std::move(message)){};

virtual ~ParseException() = default;
~ParseException() override = default;

virtual const char *what() const noexcept
{
return message.c_str();
};
const char *what() const noexcept override { return message.c_str(); };

const std::string &getMessage() const
{
Expand Down
3 changes: 1 addition & 2 deletions server/transport/websocket/WebSocketTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ class configuration_exception : public std::exception
this->message = message;
}

virtual const char *what() const _GLIBCXX_USE_NOEXCEPT
{
const char *what() const _GLIBCXX_USE_NOEXCEPT override {
return message.c_str();
}

Expand Down
2 changes: 1 addition & 1 deletion test/server_duplicate_requests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ClientHandler : public F
public:
ClientHandler() : F() {};

virtual ~ClientHandler() = default;
~ClientHandler() override = default;

protected:
void check_create_duplicate_requests_call ();
Expand Down
2 changes: 1 addition & 1 deletion test/server_events_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ClientHandler : public F
public:
ClientHandler() : F() {};

~ClientHandler() = default;
~ClientHandler() override = default;

protected:
void check_not_duplicated_event ();
Expand Down
2 changes: 1 addition & 1 deletion test/server_json_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ClientHandler : public F
public:
ClientHandler() : F() {};

virtual ~ClientHandler() = default;
~ClientHandler() override = default;

protected:
void check_create_pipeline_call ();
Expand Down
2 changes: 1 addition & 1 deletion test/server_json_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ClientHandler : public F
GST_DEFAULT_NAME);
};

~ClientHandler() = default;
~ClientHandler() override = default;

protected:
void check_error_call ();
Expand Down

0 comments on commit 14b54ee

Please # to comment.