From 34bf46e8290d3ed2c13e598527b54d2290ff11b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Thu, 31 Jan 2013 13:54:11 +0000 Subject: [PATCH] removed unused crosscast() function from emucore.h (nw) --- src/emu/emucore.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/emu/emucore.h b/src/emu/emucore.h index 90f2e815634..5b6c7291d5c 100644 --- a/src/emu/emucore.h +++ b/src/emu/emucore.h @@ -381,31 +381,6 @@ inline _Dest downcast(_Source &src) } -// template function for cross-casting from one class to another that throws a bad_cast -// exception instead of returning NULL -template -inline _Dest crosscast(_Source *src) -{ - _Dest result; -#ifdef MAME_DEBUG - try - { -#endif - result = dynamic_cast<_Dest>(src); -#ifdef MAME_DEBUG - } - catch (std::bad_cast &) - { - report_bad_cast(typeid(src), typeid(_Dest)); - } -#endif - assert(result != NULL); - if (result == NULL) - throw std::bad_cast(); - return result; -} - - //************************************************************************** // FUNCTION PROTOTYPES