From ee5cd8493e34a1c049066ead25e9094b30cd49b5 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 Feb 2012 15:04:26 -0500 Subject: Use C++11's explicit override feature if available --- include/CMakeLists.txt | 2 +- include/account.h | 8 ++++---- include/dns.h | 4 ++-- include/memo.h | 4 ++-- include/modes.h | 8 ++++---- include/regchannel.h | 20 ++++++++++---------- include/services.h | 6 ++++++ include/signals.h | 2 +- include/sockets.h | 22 +++++++++++----------- 9 files changed, 41 insertions(+), 35 deletions(-) (limited to 'include') diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index e04fe31a8..049aa478a 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -19,7 +19,7 @@ endif(NOT WIN32) set(PCH_SOURCES_GCH "") if(CMAKE_COMPILER_IS_GNUCXX) - string(REPLACE " " ";" PCH_CXXFLAGS ${CXXFLAGS}) + string(REPLACE " " ";" PCH_CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_FLAGS}") file(GLOB PCH_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h") sort_list(PCH_SOURCES) diff --git a/include/account.h b/include/account.h index ffdc7b18f..5cc8c1459 100644 --- a/include/account.h +++ b/include/account.h @@ -132,8 +132,8 @@ class CoreExport NickAlias : public Base, public Extensible, public Flags aliases; /* List of aliases */ - Anope::string serialize_name() const; - serialized_data serialize(); + Anope::string serialize_name() const anope_override; + serialized_data serialize() anope_override; static void unserialize(serialized_data &); /** Checks whether this account is a services oper or not. diff --git a/include/dns.h b/include/dns.h index c70b6b7b3..3102ec72c 100644 --- a/include/dns.h +++ b/include/dns.h @@ -121,7 +121,7 @@ class CoreExport DNSRequest : public Timer, public Question virtual void OnError(const DNSQuery *r); - void Tick(time_t); + void Tick(time_t) anope_override; }; /** A full packet sent or recieved to/from the nameserver, may contain multiple queries @@ -182,7 +182,7 @@ class CoreExport DNSManager : public Timer, public Socket /** Tick this timer, used to clear the DNS cache. */ - void Tick(time_t now); + void Tick(time_t now) anope_override; /** Cleanup all pending DNS queries for a module * @param mod The module diff --git a/include/memo.h b/include/memo.h index a6df46861..420def504 100644 --- a/include/memo.h +++ b/include/memo.h @@ -38,8 +38,8 @@ class CoreExport Memo : public Flags, public Serializable public: Memo(); - Anope::string serialize_name() const; - serialized_data serialize(); + Anope::string serialize_name() const anope_override; + serialized_data serialize() anope_override; static void unserialize(serialized_data &); Anope::string owner; diff --git a/include/modes.h b/include/modes.h index b1195d27d..9cfc607cc 100644 --- a/include/modes.h +++ b/include/modes.h @@ -304,7 +304,7 @@ class CoreExport ChannelModeKey : public ChannelModeParam public: ChannelModeKey(char modeChar) : ChannelModeParam(CMODE_KEY, modeChar) { } - bool IsValid(const Anope::string &value) const; + bool IsValid(const Anope::string &value) const anope_override; }; /** This class is used for channel mode +A (Admin only) @@ -316,7 +316,7 @@ class CoreExport ChannelModeAdmin : public ChannelMode ChannelModeAdmin(char modeChar) : ChannelMode(CMODE_ADMINONLY, modeChar) { } /* Opers only */ - bool CanSet(User *u) const; + bool CanSet(User *u) const anope_override; }; /** This class is used for channel mode +O (Opers only) @@ -328,7 +328,7 @@ class CoreExport ChannelModeOper : public ChannelMode ChannelModeOper(char modeChar) : ChannelMode(CMODE_OPERONLY, modeChar) { } /* Opers only */ - bool CanSet(User *u) const; + bool CanSet(User *u) const anope_override; }; /** This class is used for channel mode +r (registered channel) @@ -340,7 +340,7 @@ class CoreExport ChannelModeRegistered : public ChannelMode ChannelModeRegistered(char modeChar) : ChannelMode(CMODE_REGISTERED, modeChar) { } /* No one mlocks +r */ - bool CanSet(User *u) const; + bool CanSet(User *u) const anope_override; }; enum StackerType diff --git a/include/regchannel.h b/include/regchannel.h index 614b98f19..851d98f19 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -88,8 +88,8 @@ struct CoreExport BadWord : Serializable Anope::string word; BadWordType type; - Anope::string serialize_name() const; - serialized_data serialize(); + Anope::string serialize_name() const anope_override; + serialized_data serialize() anope_override; static void unserialize(serialized_data &); }; @@ -118,8 +118,8 @@ class CoreExport AutoKick : public Flags, public Serializable time_t addtime; time_t last_used; - Anope::string serialize_name() const; - serialized_data serialize(); + Anope::string serialize_name() const anope_override; + serialized_data serialize() anope_override; static void unserialize(serialized_data &); }; @@ -135,8 +135,8 @@ struct CoreExport ModeLock : Serializable ModeLock(ChannelInfo *ch, bool s, ChannelModeName n, const Anope::string &p, const Anope::string &se = "", time_t c = Anope::CurTime); - Anope::string serialize_name() const; - serialized_data serialize(); + Anope::string serialize_name() const anope_override; + serialized_data serialize() anope_override; static void unserialize(serialized_data &); }; @@ -153,8 +153,8 @@ struct CoreExport LogSetting : Serializable Anope::string creator; time_t created; - Anope::string serialize_name() const; - serialized_data serialize(); + Anope::string serialize_name() const anope_override; + serialized_data serialize() anope_override; static void unserialize(serialized_data &); }; @@ -212,8 +212,8 @@ class CoreExport ChannelInfo : public Extensible, public Flags