From cbd0f52eff232c1304658049ef9f2a64fc980a6c Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 4 Nov 2010 00:36:53 -0400 Subject: Made Base not virtual, prevents us from having to dynamic cast in the mode stacker on release builds --- src/modes.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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 ModeManager::BuildModeStrings(StackerInfo *info) if (info->Type == ST_CHANNEL) { - cm = dynamic_cast(it->first); + cm = debug_cast(it->first); buf += cm->ModeChar; } else if (info->Type == ST_USER) { - um = dynamic_cast(it->first); + um = debug_cast(it->first); buf += um->ModeChar; } @@ -578,12 +578,12 @@ std::list ModeManager::BuildModeStrings(StackerInfo *info) if (info->Type == ST_CHANNEL) { - cm = dynamic_cast(it->first); + cm = debug_cast(it->first); buf += cm->ModeChar; } else if (info->Type == ST_USER) { - um = dynamic_cast(it->first); + um = debug_cast(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(Object)->ci); + s->bi = whosends(debug_cast(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(it->first); + u = debug_cast(it->first); else if (s->Type == ST_CHANNEL) - c = dynamic_cast(it->first); + c = debug_cast(it->first); else throw CoreException("ModeManager::ProcessModes got invalid Stacker Info type"); -- cgit