diff --git a/src/gamelog_internal.h b/src/gamelog_internal.h index 23c35c8bd6..f0cbf18228 100644 --- a/src/gamelog_internal.h +++ b/src/gamelog_internal.h @@ -30,7 +30,7 @@ using GrfIDMapping = std::map; struct LoggedChange { LoggedChange(GamelogChangeType type = GLCT_NONE) : ct(type) {} - virtual ~LoggedChange() {} + virtual ~LoggedChange() = default; virtual void FormatTo(std::back_insert_iterator &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) = 0; GamelogChangeType ct; diff --git a/src/ini_type.h b/src/ini_type.h index 5b255acca5..dfb3cacc65 100644 --- a/src/ini_type.h +++ b/src/ini_type.h @@ -56,7 +56,7 @@ struct IniLoadFile { const IniGroupNameList seq_group_names; ///< list of group names that are sequences. IniLoadFile(const IniGroupNameList &list_group_names = {}, const IniGroupNameList &seq_group_names = {}); - virtual ~IniLoadFile() { } + virtual ~IniLoadFile() = default; const IniGroup *GetGroup(std::string_view name) const; IniGroup *GetGroup(std::string_view name); diff --git a/src/network/network_crypto.h b/src/network/network_crypto.h index ad8b74ca37..aa03ea79ce 100644 --- a/src/network/network_crypto.h +++ b/src/network/network_crypto.h @@ -40,7 +40,7 @@ */ class NetworkEncryptionHandler { public: - virtual ~NetworkEncryptionHandler() {} + virtual ~NetworkEncryptionHandler() = default; /** * Get the size of the MAC (Message Authentication Code) used by the underlying encryption protocol. @@ -70,7 +70,7 @@ public: */ class NetworkAuthenticationPasswordRequest { public: - virtual ~NetworkAuthenticationPasswordRequest() {} + virtual ~NetworkAuthenticationPasswordRequest() = default; /** * Reply to the request with the given password. @@ -108,7 +108,7 @@ public: */ class NetworkAuthenticationPasswordProvider { public: - virtual ~NetworkAuthenticationPasswordProvider() {} + virtual ~NetworkAuthenticationPasswordProvider() = default; /** * Callback to return the password where to validate against. @@ -139,7 +139,7 @@ public: */ class NetworkAuthenticationAuthorizedKeyHandler { public: - virtual ~NetworkAuthenticationAuthorizedKeyHandler() {} + virtual ~NetworkAuthenticationAuthorizedKeyHandler() = default; /** * Check whether the key handler can be used, i.e. whether there are authorized keys to check against. @@ -189,7 +189,7 @@ using NetworkAuthenticationMethodMask = uint16_t; */ class NetworkAuthenticationHandler { public: - virtual ~NetworkAuthenticationHandler() {} + virtual ~NetworkAuthenticationHandler() = default; /** * Get the name of the handler for debug messages. diff --git a/src/random_access_file_type.h b/src/random_access_file_type.h index c62e67a3de..95a4d94ad0 100644 --- a/src/random_access_file_type.h +++ b/src/random_access_file_type.h @@ -40,7 +40,7 @@ public: RandomAccessFile(const RandomAccessFile&) = delete; void operator=(const RandomAccessFile&) = delete; - virtual ~RandomAccessFile() {} + virtual ~RandomAccessFile() = default; const std::string &GetFilename() const; const std::string &GetSimplifiedFilename() const; diff --git a/src/saveload/saveload_filter.h b/src/saveload/saveload_filter.h index 13702f34f5..47b6fb46fa 100644 --- a/src/saveload/saveload_filter.h +++ b/src/saveload/saveload_filter.h @@ -24,9 +24,7 @@ struct LoadFilter { } /** Make sure the writers are properly closed. */ - virtual ~LoadFilter() - { - } + virtual ~LoadFilter() = default; /** * Read a given number of bytes from the savegame. @@ -69,9 +67,7 @@ struct SaveFilter { } /** Make sure the writers are properly closed. */ - virtual ~SaveFilter() - { - } + virtual ~SaveFilter() = default; /** * Write a given number of bytes into the savegame. diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index 842966758c..813c667974 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -44,7 +44,7 @@ typedef bool (ScriptAsyncModeProc)(); class SimpleCountedObject { public: SimpleCountedObject() : ref_count(0) {} - virtual ~SimpleCountedObject() {} + virtual ~SimpleCountedObject() = default; inline void AddRef() { ++this->ref_count; } void Release(); diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h index 3cd83c05cb..e146b4612e 100644 --- a/src/strgen/strgen.h +++ b/src/strgen/strgen.h @@ -62,7 +62,7 @@ struct StringReader { bool translation; ///< Are we reading a translation, implies !master. However, the base translation will have this false. StringReader(StringData &data, const std::string &file, bool master, bool translation); - virtual ~StringReader() {} + virtual ~StringReader() = default; void HandleString(char *str); /** diff --git a/src/tilearea_type.h b/src/tilearea_type.h index d056282654..2f7f4e0f20 100644 --- a/src/tilearea_type.h +++ b/src/tilearea_type.h @@ -115,10 +115,7 @@ protected: } public: - /** Some compilers really like this. */ - virtual ~TileIterator() - { - } + virtual ~TileIterator() = default; /** * Get the tile we are currently at.