summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/cheat.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-11-17 20:38:38 +1100
committer Vas Crabb <vas@vastheman.com>2016-11-17 20:38:38 +1100
commit346e0a8a92e490fed2fca1e0a36cbaf9c3877b93 (patch)
tree134eca03e177003213a684f01a647a86b45e917a /src/frontend/mame/cheat.h
parent8a22a1f14d804eefa8f2ac1f0410218805162b5e (diff)
more xmlfile cleanup (nw)
* an empty tag and a self-closing tag are semantically equivalent, so std::string can be used saving some manual allocation * a valid tag can't have an empty name, so that can be std::string too * still expose empty strings as nullptr to API users * scope down the int_format enum * # is not £ ffs
Diffstat (limited to 'src/frontend/mame/cheat.h')
-rw-r--r--src/frontend/mame/cheat.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/frontend/mame/cheat.h b/src/frontend/mame/cheat.h
index aa08106b15a..bc983c160f1 100644
--- a/src/frontend/mame/cheat.h
+++ b/src/frontend/mame/cheat.h
@@ -16,6 +16,7 @@
#include "debug/express.h"
#include "debug/debugcpu.h"
#include "ui/text.h"
+#include "xmlfile.h"
//**************************************************************************
@@ -49,7 +50,7 @@ class number_and_format
{
public:
// construction/destruction
- number_and_format(uint64_t value = 0, int format = 0)
+ number_and_format(uint64_t value = 0, xml_data_node::int_format format = xml_data_node::int_format::DECIMAL)
: m_value(value)
, m_format(format)
{
@@ -64,8 +65,8 @@ public:
private:
// internal state
- uint64_t m_value;
- int m_format;
+ uint64_t m_value;
+ xml_data_node::int_format m_format;
};
@@ -98,9 +99,10 @@ private:
{
public:
// construction/destruction
- item(const char *text, uint64_t value, int valformat)
- : m_text(text),
- m_value(value, valformat) { }
+ item(const char *text, uint64_t value, xml_data_node::int_format valformat)
+ : m_text(text)
+ , m_value(value, valformat)
+ { }
// getters
const number_and_format &value() const { return m_value; }