From 5a5dcfa4f90f4235621b87d93c227566caa0fce1 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 29 Aug 2016 14:50:59 +0200 Subject: [PATCH] Mark ModeHandler::GetModeChar() and ModeWatcher::GetModeType() as const --- include/mode.h | 4 ++-- src/mode.cpp | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/mode.h b/include/mode.h index 64829845f..093822372 100644 --- a/include/mode.h +++ b/include/mode.h @@ -214,7 +214,7 @@ class CoreExport ModeHandler : public ServiceProvider * Returns the mode character this handler handles. * @return The mode character */ - inline char GetModeChar() { return mode; } + char GetModeChar() const { return mode; } /** Return the id of this mode which is used in User::modes and * Channel::modes as the index to determine whether a mode is set. @@ -450,7 +450,7 @@ class CoreExport ModeWatcher : public classbase * Get the mode type being watched * @return The mode type being watched (user or channel) */ - ModeType GetModeType(); + ModeType GetModeType() const { return m_type; } /** * Before the mode character is processed by its handler, this method will be called. diff --git a/src/mode.cpp b/src/mode.cpp index 8d3d9ccfa..beea6d3a0 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -144,11 +144,6 @@ ModeWatcher::~ModeWatcher() ServerInstance->Modes->DelModeWatcher(this); } -ModeType ModeWatcher::GetModeType() -{ - return m_type; -} - bool ModeWatcher::BeforeMode(User*, User*, Channel*, std::string&, bool) { return true; -- 2.39.2