summaryrefslogtreecommitdiff
path: root/src/modes.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-07-27 21:31:13 -0400
committerAdam <Adam@anope.org>2010-07-27 21:31:13 -0400
commit4b870cc5f9671201dfad6fa836847cdd40aef519 (patch)
tree34aec3d880a22a8a828e5f5a7917e583cee92023 /src/modes.cpp
parent66c0e280ee9d4940fe5a477d3e933ba4221e35db (diff)
Added debug_cast which uses dynamic_cast on debug builds, and static_cast on release builds
Diffstat (limited to 'src/modes.cpp')
-rw-r--r--src/modes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modes.cpp b/src/modes.cpp
index af4c2f879..6d8fca77e 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -87,7 +87,7 @@ void SetDefaultMLock()
ChannelMode *cm = ModeManager::FindChannelModeByChar(Config.BotModes[i]);
if (cm && cm->Type == MODE_STATUS && std::find(BotModes.begin(), BotModes.end(), cm) == BotModes.end())
- BotModes.push_back(dynamic_cast<ChannelModeStatus *>(cm));
+ BotModes.push_back(debug_cast<ChannelModeStatus *>(cm));
}
}
@@ -730,7 +730,7 @@ char ModeManager::GetStatusChar(char Value)
cm = it->second;
if (cm->Type == MODE_STATUS)
{
- cms = dynamic_cast<ChannelModeStatus *>(cm);
+ cms = debug_cast<ChannelModeStatus *>(cm);
if (Value == cms->Symbol)
return it->first;