diff options
author | Peter Powell <petpow@saberuk.com> | 2017-07-12 14:41:52 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-07-12 14:41:52 +0100 |
commit | d1df2bce56275e1297d94d82d4dbef6f6cf582b6 (patch) | |
tree | 3b968cb8a2b3b90b74ae0633e2a4a7fa04782d8e /include | |
parent | f471083cd0519d47c7c7a09029813ede41994f7b (diff) |
Add CXX11_OVERRIDE to overridden members that lack it.
This fixes a ton of warnings when building on compilers that
default to C++11 or newer.
Diffstat (limited to 'include')
-rw-r--r-- | include/builtinmodes.h | 4 | ||||
-rw-r--r-- | include/extensible.h | 2 | ||||
-rw-r--r-- | include/inspsocket.h | 4 | ||||
-rw-r--r-- | include/mode.h | 2 | ||||
-rw-r--r-- | include/modules.h | 2 | ||||
-rw-r--r-- | include/users.h | 24 |
6 files changed, 19 insertions, 19 deletions
diff --git a/include/builtinmodes.h b/include/builtinmodes.h index a77734ae3..bfb46823f 100644 --- a/include/builtinmodes.h +++ b/include/builtinmodes.h @@ -97,8 +97,8 @@ class ModeUserServerNoticeMask : public ModeHandler public: ModeUserServerNoticeMask(); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); - void OnParameterMissing(User* user, User* dest, Channel* channel); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) CXX11_OVERRIDE; + void OnParameterMissing(User* user, User* dest, Channel* channel) CXX11_OVERRIDE; /** Create a displayable mode string of the snomasks set on a given user * @param user The user whose notice masks to format diff --git a/include/extensible.h b/include/extensible.h index 07756fb59..1da45cee6 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -111,7 +111,7 @@ class CoreExport Extensible : public classbase inline const ExtensibleStore& GetExtList() const { return extensions; } Extensible(); - virtual CullResult cull(); + virtual CullResult cull() CXX11_OVERRIDE; virtual ~Extensible(); void doUnhookExtensions(const std::vector<reference<ExtensionItem> >& toRemove); diff --git a/include/inspsocket.h b/include/inspsocket.h index 751374fdf..95f29ff11 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -312,7 +312,7 @@ class CoreExport StreamSocket : public EventHandler */ virtual void Close(); /** This ensures that close is called prior to destructor */ - virtual CullResult cull(); + virtual CullResult cull() CXX11_OVERRIDE; /** Get the IOHook of a module attached to this socket * @param mod Module whose IOHook to return @@ -372,7 +372,7 @@ class CoreExport BufferedSocket : public StreamSocket /** When there is data waiting to be read on a socket, the OnDataReady() * method is called. */ - virtual void OnDataReady() = 0; + virtual void OnDataReady() CXX11_OVERRIDE = 0; /** * When an outbound connection fails, and the attempt times out, you diff --git a/include/mode.h b/include/mode.h index 956b86050..2e9ed22f3 100644 --- a/include/mode.h +++ b/include/mode.h @@ -166,7 +166,7 @@ class CoreExport ModeHandler : public ServiceProvider * @param mclass The object type of this mode handler, one of ModeHandler::Class */ ModeHandler(Module* me, const std::string& name, char modeletter, ParamSpec params, ModeType type, Class mclass = MC_OTHER); - virtual CullResult cull(); + virtual CullResult cull() CXX11_OVERRIDE; virtual ~ModeHandler(); /** Register this object in the ModeParser diff --git a/include/modules.h b/include/modules.h index 5deed943a..d9d05a396 100644 --- a/include/modules.h +++ b/include/modules.h @@ -276,7 +276,7 @@ class CoreExport Module : public classbase, public usecountbase /** Clean up prior to destruction * If you override, you must call this AFTER your module's cleanup */ - virtual CullResult cull(); + virtual CullResult cull() CXX11_OVERRIDE; /** Default destructor. * destroys a module class diff --git a/include/users.h b/include/users.h index 4939feb1e..4c8df549d 100644 --- a/include/users.h +++ b/include/users.h @@ -717,7 +717,7 @@ class CoreExport User : public Extensible /** Default destructor */ virtual ~User(); - virtual CullResult cull(); + virtual CullResult cull() CXX11_OVERRIDE; }; class CoreExport UserIOHandler : public StreamSocket @@ -742,7 +742,7 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local { public: LocalUser(int fd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server); - CullResult cull(); + CullResult cull() CXX11_OVERRIDE; UserIOHandler eh; @@ -836,12 +836,12 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local */ void SetClass(const std::string &explicit_name = ""); - bool SetClientIP(const char* sip, bool recheck_eline = true); + bool SetClientIP(const char* sip, bool recheck_eline = true) CXX11_OVERRIDE; - void SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline = true); + void SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline = true) CXX11_OVERRIDE; - void Write(const std::string& text); - void Write(const char*, ...) CUSTOM_PRINTF(2, 3); + void Write(const std::string& text) CXX11_OVERRIDE; + void Write(const char*, ...) CXX11_OVERRIDE CUSTOM_PRINTF(2, 3); /** Send a NOTICE message from the local server to the user. * The message will be sent even if the user is connected to a remote server. @@ -855,7 +855,7 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local * @param command A command (should be all CAPS) * @return True if this user can execute the command */ - bool HasPermission(const std::string &command); + bool HasPermission(const std::string &command) CXX11_OVERRIDE; /** Returns true if a user has a given permission. * This is used to check whether or not users may perform certain actions which admins may not wish to give to @@ -865,7 +865,7 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local * @param noisy If set to true, the user is notified that they do not have the specified permission where applicable. If false, no notification is sent. * @return True if this user has the permission in question. */ - bool HasPrivPermission(const std::string &privstr, bool noisy = false); + bool HasPrivPermission(const std::string &privstr, bool noisy = false) CXX11_OVERRIDE; /** Returns true or false if a user can set a privileged user or channel mode. * This is done by looking up their oper type from User::oper, then referencing @@ -873,7 +873,7 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local * @param mh Mode to check * @return True if the user can set or unset this mode. */ - bool HasModePermission(const ModeHandler* mh) const; + bool HasModePermission(const ModeHandler* mh) const CXX11_OVERRIDE; /** Change nick to uuid, unset REG_NICK and send a nickname overruled numeric. * This is called when another user (either local or remote) needs the nick of this user and this user @@ -904,9 +904,9 @@ class CoreExport FakeUser : public User nick = sname; } - virtual CullResult cull(); - virtual const std::string& GetFullHost(); - virtual const std::string& GetFullRealHost(); + virtual CullResult cull() CXX11_OVERRIDE; + virtual const std::string& GetFullHost() CXX11_OVERRIDE; + virtual const std::string& GetFullRealHost() CXX11_OVERRIDE; }; /* Faster than dynamic_cast */ |