diff options
| author | Adam <Adam@anope.org> | 2014-04-01 22:24:50 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-04-01 22:24:50 -0400 |
| commit | 44637154da89028a99920bd6ead5d917d8a894a4 (patch) | |
| tree | cb2bd670800efb25beb2c71983b1db49a3f78d49 /include | |
| parent | b12a51a430b00e857cc5568c9fd994bbd88c8ff7 (diff) | |
Require cmake 2.8 and C++11 support
Diffstat (limited to 'include')
40 files changed, 109 insertions, 1083 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 6170cde27..7476edfe7 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -17,47 +17,5 @@ if(NOT WIN32) add_to_cpack_ignored_files("version.h$" TRUE) endif(NOT WIN32) -set(PCH_SOURCES_GCH "") -if(USE_PCH AND CMAKE_COMPILER_IS_GNUCXX) - string(REPLACE " " ";" PCH_CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_FLAGS}") - - file(GLOB PCH_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h") - sort_list(PCH_SOURCES) - - foreach(PCH_SOURCE ${PCH_SOURCES}) - find_includes(${PCH_SOURCE} INCLUDES) - set(INCLUDES_LIST) - append_to_list(INCLUDES_LIST ${PCH_SOURCE}) - foreach(INCLUDE ${INCLUDES}) - # Extract the filename from the #include line - extract_include_filename(${INCLUDE} FILENAME QUOTE_TYPE) - if(QUOTE_TYPE STREQUAL "quotes") - find_in_list(PCH_SOURCES "${FILENAME}" FOUND) - if(NOT FOUND EQUAL -1) - append_to_list(INCLUDES_LIST ${FILENAME}) - endif(NOT FOUND EQUAL -1) - endif(QUOTE_TYPE STREQUAL "quotes") - endforeach(INCLUDE) - - set(PCH_EXTRAFLAGS "") - if(DEBUG_BUILD) - set(PCH_EXTRAFLAGS "-g") - endif(DEBUG_BUILD) - if(PCH_SOURCE STREQUAL "module.h") - set(PCH_EXTRAFLAGS ${PCH_EXTRAFLAGS} -fPIC) - endif(PCH_SOURCE STREQUAL "module.h") - if(GETTEXT_INCLUDE) - set(PCH_GETTEXT_INCLUDE "-I${GETTEXT_INCLUDE}") - endif(GETTEXT_INCLUDE) - - set(PCH_SOURCES_GCH "${PCH_SOURCES_GCH};${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch") - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch - COMMAND ${CMAKE_CXX_COMPILER} ARGS ${PCH_CXXFLAGS} ${PCH_EXTRAFLAGS} - ${PCH_GETTEXT_INCLUDE} -I${CMAKE_CURRENT_BINARY_DIR} -I${Anope_SOURCE_DIR}/modules/pseudoclients ${CMAKE_CURRENT_SOURCE_DIR}/${PCH_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch - DEPENDS ${INCLUDES_LIST} VERBATIM - ) - endforeach(PCH_SOURCE ${PCH_SOURCES}) -endif(USE_PCH AND CMAKE_COMPILER_IS_GNUCXX) - # Add a custom target to the above file -add_custom_target(headers DEPENDS version ${CMAKE_CURRENT_BINARY_DIR}/version_build ${PCH_SOURCES_GCH}) +add_custom_target(headers DEPENDS version ${CMAKE_CURRENT_BINARY_DIR}/version_build) diff --git a/include/access.h b/include/access.h index 57229abab..292e95228 100644 --- a/include/access.h +++ b/include/access.h @@ -10,8 +10,7 @@ * */ -#ifndef ACCESS_H -#define ACCESS_H +#pragma once #include "services.h" #include "anope.h" @@ -96,7 +95,7 @@ class CoreExport ChanAccess : public Serializable ChanAccess(AccessProvider *p); virtual ~ChanAccess(); - void Serialize(Serialize::Data &data) const anope_override; + void Serialize(Serialize::Data &data) const override; static Serializable* Unserialize(Serializable *obj, Serialize::Data &); /** Check if this access entry matches the given user or account @@ -168,5 +167,3 @@ class CoreExport AccessGroup : public std::vector<ChanAccess *> bool operator<=(const AccessGroup &other) const; }; -#endif - diff --git a/include/account.h b/include/account.h index 2c8c6ecb5..381047ac4 100644 --- a/include/account.h +++ b/include/account.h @@ -10,8 +10,7 @@ * */ -#ifndef ACCOUNT_H -#define ACCOUNT_H +#pragma once #include "extensible.h" #include "serialize.h" @@ -53,7 +52,7 @@ class CoreExport NickAlias : public Serializable, public Extensible NickAlias(const Anope::string &nickname, NickCore *nickcore); ~NickAlias(); - void Serialize(Serialize::Data &data) const anope_override; + void Serialize(Serialize::Data &data) const override; static Serializable* Unserialize(Serializable *obj, Serialize::Data &); /** Set a vhost for the user @@ -145,7 +144,7 @@ class CoreExport NickCore : public Serializable, public Extensible NickCore(const Anope::string &nickdisplay); ~NickCore(); - void Serialize(Serialize::Data &data) const anope_override; + void Serialize(Serialize::Data &data) const override; static Serializable* Unserialize(Serializable *obj, Serialize::Data &); /** Changes the display for this account @@ -278,5 +277,3 @@ class CoreExport IdentifyRequest static void ModuleUnload(Module *m); }; - -#endif // ACCOUNT_H diff --git a/include/anope.h b/include/anope.h index 638661440..bb20299e4 100644 --- a/include/anope.h +++ b/include/anope.h @@ -10,8 +10,7 @@ * */ -#ifndef ANOPE_H -#define ANOPE_H +#pragma once #include <signal.h> @@ -313,7 +312,7 @@ namespace Anope { inline size_t operator()(const string &s) const { - return TR1NS::hash<std::string>()(s.lower().str()); + return std::hash<std::string>()(s.lower().str()); } }; @@ -321,7 +320,7 @@ namespace Anope { inline size_t operator()(const string &s) const { - return TR1NS::hash<std::string>()(s.str()); + return std::hash<std::string>()(s.str()); } }; @@ -335,7 +334,7 @@ namespace Anope template<typename T> class map : public std::map<string, T, ci::less> { }; template<typename T> class multimap : public std::multimap<string, T, ci::less> { }; - template<typename T> class hash_map : public TR1NS::unordered_map<string, T, hash_ci, compare> { }; + template<typename T> class hash_map : public std::unordered_map<string, T, hash_ci, compare> { }; static const char *const compiled = __TIME__ " " __DATE__; @@ -776,5 +775,3 @@ template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr) return static_cast<T>(ptr); } #endif - -#endif // ANOPE_H diff --git a/include/base.h b/include/base.h index e64af87a4..a28695c5f 100644 --- a/include/base.h +++ b/include/base.h @@ -7,8 +7,7 @@ * */ -#ifndef BASE_H -#define BASE_H +#pragma once #include "services.h" @@ -141,5 +140,3 @@ class Reference : public ReferenceBase } }; -#endif // BASE_H - diff --git a/include/bots.h b/include/bots.h index bab3931c5..353be89cb 100644 --- a/include/bots.h +++ b/include/bots.h @@ -7,8 +7,7 @@ * */ -#ifndef BOTS_H -#define BOTS_H +#pragma once #include "users.h" #include "anope.h" @@ -133,4 +132,3 @@ class CoreExport BotInfo : public User, public Serializable static BotInfo* Find(const Anope::string &nick, bool nick_only = false); }; -#endif // BOTS_H diff --git a/include/channels.h b/include/channels.h index 27119adf4..69d7ee787 100644 --- a/include/channels.h +++ b/include/channels.h @@ -7,8 +7,7 @@ * */ -#ifndef CHANNELS_H -#define CHANNELS_H +#pragma once #include "anope.h" #include "extensible.h" @@ -301,4 +300,3 @@ class CoreExport Channel : public Base, public Extensible static Channel *FindOrCreate(const Anope::string &name, bool &created, time_t ts = Anope::CurTime); }; -#endif // CHANNELS_H diff --git a/include/commands.h b/include/commands.h index f2b0592d4..2be64d00d 100644 --- a/include/commands.h +++ b/include/commands.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef COMMAND_H -#define COMMAND_H +#pragma once #include "service.h" #include "anope.h" @@ -180,4 +179,3 @@ class CoreExport Command : public Service static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name); }; -#endif // COMMANDS_H diff --git a/include/config.h b/include/config.h index 308775e41..ccb04ce55 100644 --- a/include/config.h +++ b/include/config.h @@ -10,8 +10,7 @@ * */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "account.h" #include "regchannel.h" @@ -177,4 +176,3 @@ class ConfigException : public CoreException extern Configuration::File ServicesConf; extern CoreExport Configuration::Conf *Config; -#endif // CONFIG_H diff --git a/include/extensible.h b/include/extensible.h index f33312393..ef429b919 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -7,8 +7,7 @@ * */ -#ifndef EXTENSIBLE_H -#define EXTENSIBLE_H +#pragma once #include "anope.h" #include "serialize.h" @@ -92,7 +91,7 @@ class BaseExtensibleItem : public ExtensibleBase return t; } - void Unset(Extensible *obj) anope_override + void Unset(Extensible *obj) override { T *value = Get(obj); items.erase(obj); @@ -127,7 +126,7 @@ template<typename T> class ExtensibleItem : public BaseExtensibleItem<T> { protected: - T* Create(Extensible *obj) anope_override + T* Create(Extensible *obj) override { return new T(obj); } @@ -139,7 +138,7 @@ template<typename T> class PrimitiveExtensibleItem : public BaseExtensibleItem<T> { protected: - T* Create(Extensible *obj) anope_override + T* Create(Extensible *obj) override { return new T(); } @@ -151,7 +150,7 @@ template<> class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool> { protected: - bool* Create(Extensible *) anope_override + bool* Create(Extensible *) override { return NULL; } @@ -165,13 +164,13 @@ class SerializableExtensibleItem : public PrimitiveExtensibleItem<T> public: SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<T>(m, n) { } - void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override + void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override { T* t = this->Get(e); data[this->name] << *t; } - void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override + void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override { T t; if (data[this->name] >> t) @@ -185,12 +184,12 @@ class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool> public: SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<bool>(m, n) { } - void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override + void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override { data[this->name] << true; } - void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override + void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override { bool b = false; data[this->name] >> b; @@ -255,4 +254,3 @@ void Extensible::Shrink(const Anope::string &name) Log(LOG_DEBUG) << "Shrink for nonexistent type " << name << " on " << static_cast<void *>(this); } -#endif // EXTENSIBLE_H diff --git a/include/hashcomp.h b/include/hashcomp.h index 140131e72..2364975b9 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -7,19 +7,11 @@ * */ -#ifndef HASHCOMP_H -#define HASHCOMP_H +#pragma once #include <string> #include <locale> - -#if defined _LIBCPP_VERSION || defined _WIN32 #include <unordered_map> -#define TR1NS std -#else -#include <tr1/unordered_map> -#define TR1NS std::tr1 -#endif #include "services.h" @@ -39,7 +31,7 @@ namespace Anope class ascii_ctype : public std::ctype<char_type> { public: - char_type do_toupper(char_type c) const anope_override + char_type do_toupper(char_type c) const override { if (c >= 'a' && c <= 'z') return c - 32; @@ -47,7 +39,7 @@ namespace Anope return c; } - char_type do_tolower(char_type c) const anope_override + char_type do_tolower(char_type c) const override { if (c >= 'A' && c <= 'Z') return c + 32; @@ -61,7 +53,7 @@ namespace Anope class rfc1459_ctype : public ascii_ctype<char_type> { public: - char_type do_toupper(char_type c) const anope_override + char_type do_toupper(char_type c) const override { if (c == '{' || c == '}' || c == '|') return c - 32; @@ -69,7 +61,7 @@ namespace Anope return ascii_ctype<char_type>::do_toupper(c); } - char_type do_tolower(char_type c) const anope_override + char_type do_tolower(char_type c) const override { if (c == '[' || c == ']' || c == '\\') return c + 32; @@ -197,4 +189,3 @@ inline bool operator!=(const std::string &leftval, const ci::string &rightval) return !(leftval.c_str() == rightval); } -#endif // HASHCOMP_H diff --git a/include/lists.h b/include/lists.h index 980f8b533..36e5ae30d 100644 --- a/include/lists.h +++ b/include/lists.h @@ -10,8 +10,7 @@ * */ -#ifndef LISTS_H -#define LISTS_H +#pragma once #include "services.h" #include "anope.h" @@ -92,5 +91,3 @@ class CoreExport InfoFormatter void AddOption(const Anope::string &opt); }; -#endif // LISTS_H - diff --git a/include/logger.h b/include/logger.h index 31fd4f627..73180e66e 100644 --- a/include/logger.h +++ b/include/logger.h @@ -10,8 +10,7 @@ * */ -#ifndef LOGGER_H -#define LOGGER_H +#pragma once #include "anope.h" #include "defs.h" @@ -137,5 +136,3 @@ class CoreExport LogInfo void ProcessMessage(const Log *l); }; -#endif // LOGGER_H - diff --git a/include/mail.h b/include/mail.h index 5a355ab5f..2f59b5000 100644 --- a/include/mail.h +++ b/include/mail.h @@ -11,8 +11,7 @@ * */ -#ifndef MAIL_H -#define MAIL_H +#pragma once #include "anope.h" #include "threadengine.h" @@ -50,9 +49,8 @@ namespace Mail ~Message(); /* Called from within the thread to actually send the mail */ - void Run() anope_override; + void Run() override; }; } // namespace Mail -#endif // MAIL_H diff --git a/include/memo.h b/include/memo.h index 75691d89f..103f00ca1 100644 --- a/include/memo.h +++ b/include/memo.h @@ -10,8 +10,7 @@ * */ -#ifndef MEMO_H -#define MEMO_H +#pragma once #include "anope.h" #include "serialize.h" @@ -24,7 +23,7 @@ class CoreExport Memo : public Serializable Memo(); ~Memo(); - void Serialize(Serialize::Data &data) const anope_override; + void Serialize(Serialize::Data &data) const override; static Serializable* Unserialize(Serializable *obj, Serialize::Data &); Anope::string owner; @@ -52,4 +51,3 @@ struct CoreExport MemoInfo static MemoInfo *GetMemoInfo(const Anope::string &targ, bool &is_chan); }; -#endif // MEMO_H diff --git a/include/messages.h b/include/messages.h index e805903b3..070fcb84f 100644 --- a/include/messages.h +++ b/include/messages.h @@ -24,35 +24,35 @@ namespace Message { Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Capab : IRCDMessage { Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Error : IRCDMessage { Error(Module *creator, const Anope::string &mname = "ERROR") : IRCDMessage(creator, mname, 1) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Invite : IRCDMessage { Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Join : IRCDMessage { Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; typedef std::pair<ChannelStatus, User *> SJoinUser; @@ -70,106 +70,105 @@ namespace Message { Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Kill : IRCDMessage { Kill(Module *creator, const Anope::string &mname = "KILL") : IRCDMessage(creator, mname, 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Mode : IRCDMessage { Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport MOTD : IRCDMessage { MOTD(Module *creator, const Anope::string &mname = "MOTD") : IRCDMessage(creator, mname, 1) { } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Notice : IRCDMessage { Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Part : IRCDMessage { Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Ping : IRCDMessage { Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Privmsg : IRCDMessage { Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Quit : IRCDMessage { Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport SQuit : IRCDMessage { SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Stats : IRCDMessage { Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Time : IRCDMessage { Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Topic : IRCDMessage { Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Version : IRCDMessage { Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; struct CoreExport Whois : IRCDMessage { Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override; + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) override; }; } // namespace Message - diff --git a/include/modes.h b/include/modes.h index 8f67959e8..279d1dbc1 100644 --- a/include/modes.h +++ b/include/modes.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef MODES_H -#define MODES_H +#pragma once #include "anope.h" #include "base.h" @@ -102,7 +101,7 @@ class CoreExport ChannelMode : public Mode */ ChannelMode(const Anope::string &name, char mc); - bool CanSet(User *u) const anope_override; + bool CanSet(User *u) const override; }; /** This is a mode for lists, eg b/e/I. These modes should inherit from this @@ -207,7 +206,7 @@ class CoreExport UserModeOperOnly : public UserMode public: UserModeOperOnly(const Anope::string &mname, char um) : UserMode(mname, um) { } - bool CanSet(User *u) const anope_override; + bool CanSet(User *u) const override; }; class CoreExport UserModeNoone : public UserMode @@ -215,7 +214,7 @@ class CoreExport UserModeNoone : public UserMode public: UserModeNoone(const Anope::string &mname, char um) : UserMode(mname, um) { } - bool CanSet(User *u) const anope_override; + bool CanSet(User *u) const override; }; /** Channel mode +k (key) @@ -225,7 +224,7 @@ class CoreExport ChannelModeKey : public ChannelModeParam public: ChannelModeKey(char mc) : ChannelModeParam("KEY", mc) { } - bool IsValid(const Anope::string &value) const anope_override; + bool IsValid(const Anope::string &value) const override; }; /** This class is used for oper only channel modes @@ -236,7 +235,7 @@ class CoreExport ChannelModeOperOnly : public ChannelMode ChannelModeOperOnly(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { } /* Opers only */ - bool CanSet(User *u) const anope_override; + bool CanSet(User *u) const override; }; |
