mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
Added some default constructors to rom_entry(), and made it so changes to flags are done through a set_flags() accessor method
This commit is contained in:
parent
ee302246c9
commit
7384598c25
@ -132,6 +132,10 @@ public:
|
|||||||
, m_offset(offset)
|
, m_offset(offset)
|
||||||
, m_length(length)
|
, m_length(length)
|
||||||
, m_flags(flags) {}
|
, m_flags(flags) {}
|
||||||
|
rom_entry(rom_entry const &) = default;
|
||||||
|
rom_entry(rom_entry &&) = default;
|
||||||
|
rom_entry &operator=(rom_entry const &) = default;
|
||||||
|
rom_entry &operator=(rom_entry &&) = default;
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
const std::string &name() const { return m_name; }
|
const std::string &name() const { return m_name; }
|
||||||
@ -139,7 +143,7 @@ public:
|
|||||||
UINT32 offset() const { return m_offset; }
|
UINT32 offset() const { return m_offset; }
|
||||||
UINT32 length() const { return m_length; }
|
UINT32 length() const { return m_length; }
|
||||||
UINT32 flags() const { return m_flags; }
|
UINT32 flags() const { return m_flags; }
|
||||||
UINT32 &flags() { return m_flags; }
|
void set_flags(UINT32 flags) { m_flags = flags; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
|
@ -914,7 +914,7 @@ void rom_load_manager::process_rom_entries(const char *regiontag, const rom_entr
|
|||||||
if (!ROM_INHERITSFLAGS(&modified_romp))
|
if (!ROM_INHERITSFLAGS(&modified_romp))
|
||||||
lastflags = modified_romp.flags();
|
lastflags = modified_romp.flags();
|
||||||
else
|
else
|
||||||
modified_romp.flags() = (modified_romp.flags() & ~ROM_INHERITEDFLAGS) | lastflags;
|
modified_romp.set_flags((modified_romp.flags() & ~ROM_INHERITEDFLAGS) | lastflags);
|
||||||
|
|
||||||
explength += ROM_GETLENGTH(&modified_romp);
|
explength += ROM_GETLENGTH(&modified_romp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user