summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/emucore.h
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2014-03-28 22:36:30 +0000
committer Olivier Galibert <galibert@pobox.com>2014-03-28 22:36:30 +0000
commit01147293dec3d564f6a6c36feea970d62263ed7f (patch)
treeb7131958401ad88d156d49bd06949bc7b499feda /src/emu/emucore.h
parent7a6ec6b45f9c99b4b27359cfbe73823be912617f (diff)
That was not supposed to be in... (nw)
Diffstat (limited to 'src/emu/emucore.h')
-rw-r--r--src/emu/emucore.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index 61e1d0269d1..450c23b7584 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -343,6 +343,7 @@ void report_bad_device_cast(const device_t *dev, const std::type_info &src_type,
template<class _Dest, class _Source>
inline _Dest downcast(_Source *src)
{
+#if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST)
try {
if (dynamic_cast<_Dest>(src) != src)
{
@@ -356,12 +357,14 @@ inline _Dest downcast(_Source *src)
{
report_bad_cast(typeid(src), typeid(_Dest));
}
+#endif
return static_cast<_Dest>(src);
}
template<class _Dest, class _Source>
inline _Dest downcast(_Source &src)
{
+#if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST)
try {
if (&dynamic_cast<_Dest>(src) != &src)
{
@@ -375,6 +378,7 @@ inline _Dest downcast(_Source &src)
{
report_bad_cast(typeid(src), typeid(_Dest));
}
+#endif
return static_cast<_Dest>(src);
}