summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-11-04 00:36:53 -0400
committerAdam <Adam@anope.org>2010-11-04 00:36:53 -0400
commitcbd0f52eff232c1304658049ef9f2a64fc980a6c (patch)
treeade41601535941b0f106e30d1e1786abd1044eef /src
parent4fb485895204f051ad37fa9cb716e37497fc9652 (diff)
Made Base not virtual, prevents us from having to dynamic cast in the mode stacker on release builds
Diffstat (limited to 'src')
-rw-r--r--src/modes.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modes.cpp b/src/modes.cpp
index e8ee076fc..23cd0e402 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -549,12 +549,12 @@ std::list<Anope::string> ModeManager::BuildModeStrings(StackerInfo *info)
if (info->Type == ST_CHANNEL)
{
- cm = dynamic_cast<ChannelMode *>(it->first);
+ cm = debug_cast<ChannelMode *>(it->first);
buf += cm->ModeChar;
}
else if (info->Type == ST_USER)
{
- um = dynamic_cast<UserMode *>(it->first);
+ um = debug_cast<UserMode *>(it->first);
buf += um->ModeChar;
}
@@ -578,12 +578,12 @@ std::list<Anope::string> ModeManager::BuildModeStrings(StackerInfo *info)
if (info->Type == ST_CHANNEL)
{
- cm = dynamic_cast<ChannelMode *>(it->first);
+ cm = debug_cast<ChannelMode *>(it->first);
buf += cm->ModeChar;
}
else if (info->Type == ST_USER)
{
- um = dynamic_cast<UserMode *>(it->first);
+ um = debug_cast<UserMode *>(it->first);
buf += um->ModeChar;
}
@@ -616,7 +616,7 @@ void ModeManager::StackerAddInternal(BotInfo *bi, Base *Object, Mode *mode, bool
if (bi)
s->bi = bi;
else if (Type == ST_CHANNEL)
- s->bi = whosends(dynamic_cast<Channel *>(Object)->ci);
+ s->bi = whosends(debug_cast<Channel *>(Object)->ci);
else if (Type == ST_USER)
s->bi = NULL;
}
@@ -803,9 +803,9 @@ void ModeManager::ProcessModes()
Channel *c = NULL;
if (s->Type == ST_USER)
- u = dynamic_cast<User *>(it->first);
+ u = debug_cast<User *>(it->first);
else if (s->Type == ST_CHANNEL)
- c = dynamic_cast<Channel *>(it->first);
+ c = debug_cast<Channel *>(it->first);
else
throw CoreException("ModeManager::ProcessModes got invalid Stacker Info type");