summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/parammode.h5
-rw-r--r--src/modules/m_delaymsg.cpp2
-rw-r--r--src/modules/m_repeat.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/include/parammode.h b/include/parammode.h
index b00082bd6..c79d11b6b 100644
--- a/include/parammode.h
+++ b/include/parammode.h
@@ -31,7 +31,7 @@ class CoreExport ParamModeBase : public ModeHandler
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& param, bool adding) CXX11_OVERRIDE;
// Does nothing by default
- void OnUnset(User* source, Channel* chan) { }
+ virtual void OnUnset(User* source, Channel* chan) { }
virtual ModeAction OnSet(User* source, Channel* chan, std::string& param) = 0;
virtual void GetParameter(Channel* chan, std::string& out) = 0;
};
@@ -62,8 +62,7 @@ class ParamMode : public ParamModeBase
void OnUnsetInternal(User* source, Channel* chan) CXX11_OVERRIDE
{
- T* mh = static_cast<T*>(this);
- mh->OnUnset(source, chan);
+ this->OnUnset(source, chan);
ext.unset(chan);
}
diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp
index 9015e7bf9..f13ea48ea 100644
--- a/src/modules/m_delaymsg.cpp
+++ b/src/modules/m_delaymsg.cpp
@@ -36,7 +36,7 @@ class DelayMsgMode : public ParamMode<DelayMsgMode, LocalIntExt>
}
ModeAction OnSet(User* source, Channel* chan, std::string& parameter) CXX11_OVERRIDE;
- void OnUnset(User* source, Channel* chan);
+ void OnUnset(User* source, Channel* chan) CXX11_OVERRIDE;
void SerializeParam(Channel* chan, intptr_t n, std::string& out)
{
diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp
index af69f6be1..bd4206166 100644
--- a/src/modules/m_repeat.cpp
+++ b/src/modules/m_repeat.cpp
@@ -127,7 +127,7 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> >
{
}
- void OnUnset(User* source, Channel* chan)
+ void OnUnset(User* source, Channel* chan) CXX11_OVERRIDE
{
// Unset the per-membership extension when the mode is removed
const Channel::MemberMap& users = chan->GetUsers();