diff options
author | Vas Crabb <vas@vastheman.com> | 2019-11-10 04:08:29 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2019-11-10 04:08:29 +1100 |
commit | 13b1ebb1b4512ba808cdc5dfbdac61ed0d755d8c (patch) | |
tree | 0be119271371bb88d200c5ec598c189e88218e8d /src/devices/bus/megadrive | |
parent | 1b2acde80819ca6917c248e496725158ed4fe12e (diff) |
start putting noexcept on things that have no business throwing exceptions, starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
Diffstat (limited to 'src/devices/bus/megadrive')
-rw-r--r-- | src/devices/bus/megadrive/md_slot.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h index 988a60c1df2..cf3b20dc685 100644 --- a/src/devices/bus/megadrive/md_slot.h +++ b/src/devices/bus/megadrive/md_slot.h @@ -152,23 +152,18 @@ class base_md_cart_slot_device : public device_t, { public: // construction/destruction - base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual ~base_md_cart_slot_device(); - // device-level overrides - virtual void device_start() override; - // image-level overrides virtual image_init_result call_load() override; virtual void call_unload() override; - virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 0; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return m_must_be_loaded; } - virtual bool is_reset_on_load() const override { return 1; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return false; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return m_must_be_loaded; } + virtual bool is_reset_on_load() const noexcept override { return true; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -203,6 +198,16 @@ public: int m_type; device_md_cart_interface* m_cart; bool m_must_be_loaded; + +protected: + base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + + // device-level overrides + virtual void device_start() override; + + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + }; // ======================> md_cart_slot_device @@ -222,8 +227,8 @@ public: } md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "megadriv_cart"; } - virtual const char *file_extensions() const override { return "smd,bin,md,gen"; } + virtual const char *image_interface() const noexcept override { return "megadriv_cart"; } + virtual const char *file_extensions() const noexcept override { return "smd,bin,md,gen"; } }; // ======================> pico_cart_slot_device @@ -242,8 +247,8 @@ public: set_fixed(false); } pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "pico_cart"; } - virtual const char *file_extensions() const override { return "bin,md"; } + virtual const char *image_interface() const noexcept override { return "pico_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,md"; } }; // ======================> copera_cart_slot_device @@ -262,8 +267,8 @@ public: set_fixed(false); } copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "copera_cart"; } - virtual const char *file_extensions() const override { return "bin,md"; } + virtual const char *image_interface() const noexcept override { return "copera_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,md"; } }; |