From 74a2d8ff918db14d8621d1bd9f116e6891cc985b Mon Sep 17 00:00:00 2001 From: tchernobog Date: Sat, 16 Sep 2006 12:57:03 +0000 Subject: [PATCH] - Take in account also that pain in the ass that is MSVC++ on win32 git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1190 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/sgpemv2/templates/down_cast.tcc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/backend/sgpemv2/templates/down_cast.tcc b/src/backend/sgpemv2/templates/down_cast.tcc index 2453fdb..73dc81a 100644 --- a/src/backend/sgpemv2/templates/down_cast.tcc +++ b/src/backend/sgpemv2/templates/down_cast.tcc @@ -22,9 +22,7 @@ #ifndef DOWN_CAST_TCC #define DOWN_CAST_TCC 1 -#include - -#ifndef NDEBUG +#if (not defined NDEBUG) && (not defined _MSC_VER) #include #include #include @@ -81,6 +79,7 @@ namespace sgpem inline To& operator()(From& obj) const { #ifndef NDEBUG + #ifndef _MSC_VER try { return dynamic_cast(obj); @@ -95,6 +94,10 @@ namespace sgpem kill(me, SIGSTOP); throw; } + #else + // For MSVC++ on Win32 + return dynamic_cast(obj); + #endif #else return static_cast(obj); #endif @@ -110,7 +113,7 @@ namespace sgpem template inline To* operator()(From* obj) const { -#ifndef NDEBUG +#if (not defined NDEBUG) && (not defined _MSC_VER) To* check_ptr = dynamic_cast(obj); if(check_ptr == NULL) {