From aca5870c9c14bc56c959765f92b82a21d79ccae7 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 5 Nov 2019 22:47:14 -0500 Subject: [PATCH] Fix exception in clang debug build: "Caught unhandled St8bad_cast exception: std::bad_cast" (nw) Protected inheritance is a very dangerous game considering how MAME loves dynamic casts, and debug builds even more so. This reverts 0a5fed2ecec3c9e3cac23b769896548c28cc6091 in part. --- src/mame/drivers/goodejan.cpp | 2 +- src/mame/drivers/sengokmj.cpp | 2 +- src/mame/includes/bloodbro.h | 2 +- src/mame/includes/dcon.h | 2 +- src/mame/includes/legionna.h | 2 +- src/mame/includes/nmk16.h | 2 +- src/mame/includes/raiden.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/goodejan.cpp b/src/mame/drivers/goodejan.cpp index 205710e4f29..b37a6c0223d 100644 --- a/src/mame/drivers/goodejan.cpp +++ b/src/mame/drivers/goodejan.cpp @@ -83,7 +83,7 @@ Secret menu hack [totmejan only] (I couldn't find official way to enter, so it's #include "tilemap.h" -class goodejan_state : public driver_device, protected seibu_sound_common +class goodejan_state : public driver_device, public seibu_sound_common { public: goodejan_state(const machine_config &mconfig, device_type type, const char *tag) : diff --git a/src/mame/drivers/sengokmj.cpp b/src/mame/drivers/sengokmj.cpp index d9e9b868b4d..7928c68fc2a 100644 --- a/src/mame/drivers/sengokmj.cpp +++ b/src/mame/drivers/sengokmj.cpp @@ -67,7 +67,7 @@ RSSENGO2.72 chr. #include "tilemap.h" -class sengokmj_state : public driver_device, protected seibu_sound_common +class sengokmj_state : public driver_device, public seibu_sound_common { public: sengokmj_state(const machine_config &mconfig, device_type type, const char *tag) : diff --git a/src/mame/includes/bloodbro.h b/src/mame/includes/bloodbro.h index 5b109a4953d..7bafb6a3598 100644 --- a/src/mame/includes/bloodbro.h +++ b/src/mame/includes/bloodbro.h @@ -11,7 +11,7 @@ #include "screen.h" #include "tilemap.h" -class bloodbro_state : public driver_device, protected seibu_sound_common +class bloodbro_state : public driver_device, public seibu_sound_common { public: bloodbro_state(const machine_config &mconfig, device_type type, const char *tag) : diff --git a/src/mame/includes/dcon.h b/src/mame/includes/dcon.h index 5636bf8ad02..54ef3c3bf05 100644 --- a/src/mame/includes/dcon.h +++ b/src/mame/includes/dcon.h @@ -9,7 +9,7 @@ #include "emupal.h" #include "tilemap.h" -class dcon_state : public driver_device, protected seibu_sound_common +class dcon_state : public driver_device, public seibu_sound_common { public: dcon_state(const machine_config &mconfig, device_type type, const char *tag) : diff --git a/src/mame/includes/legionna.h b/src/mame/includes/legionna.h index f265210dc18..518e2c96670 100644 --- a/src/mame/includes/legionna.h +++ b/src/mame/includes/legionna.h @@ -15,7 +15,7 @@ #include -class legionna_state : public driver_device, protected seibu_sound_common +class legionna_state : public driver_device, public seibu_sound_common { public: legionna_state(const machine_config &mconfig, device_type type, const char *tag) diff --git a/src/mame/includes/nmk16.h b/src/mame/includes/nmk16.h index 0f4036024da..5e7d714afa7 100644 --- a/src/mame/includes/nmk16.h +++ b/src/mame/includes/nmk16.h @@ -16,7 +16,7 @@ #include "screen.h" #include "tilemap.h" -class nmk16_state : public driver_device, protected seibu_sound_common +class nmk16_state : public driver_device, public seibu_sound_common { public: nmk16_state(const machine_config &mconfig, device_type type, const char *tag) : diff --git a/src/mame/includes/raiden.h b/src/mame/includes/raiden.h index b72aa108c1c..09550e56dfc 100644 --- a/src/mame/includes/raiden.h +++ b/src/mame/includes/raiden.h @@ -15,7 +15,7 @@ #include "emupal.h" #include "tilemap.h" -class raiden_state : public driver_device, protected seibu_sound_common +class raiden_state : public driver_device, public seibu_sound_common { public: raiden_state(const machine_config &mconfig, device_type type, const char *tag) :