summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-29 14:50:59 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-29 14:50:59 +0200
commit5a5dcfa4f90f4235621b87d93c227566caa0fce1 (patch)
tree4f0f63b2b819f4e2e8576d37fa2591ee1f8d4df2
parent19f0c09aa783cc3b945c880d509c1da8bc8e0275 (diff)
Mark ModeHandler::GetModeChar() and ModeWatcher::GetModeType() as const
-rw-r--r--include/mode.h4
-rw-r--r--src/mode.cpp5
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;