1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 15:13:14 +02:00

Added debug_cast which uses dynamic_cast on debug builds, and static_cast on release builds

This commit is contained in:
Adam
2010-07-27 21:31:13 -04:00
parent 66c0e280ee
commit 4b870cc5f9
20 changed files with 83 additions and 54 deletions
+2 -2
View File
@@ -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;