summaryrefslogtreecommitdiffstats
path: root/src/lib/netlist/plib/ppreprocessor.cpp
diff options
context:
space:
mode:
author Roberto Fresca <robbie@robertofresca.com>2020-06-13 15:58:27 +0200
committer Roberto Fresca <robbie@robertofresca.com>2020-06-13 15:58:27 +0200
commit284f196df1c65a91eb38a5a9f31a2da7fb86a1ac (patch)
treed29473e4024dce305d0ee3bb957a663420417312 /src/lib/netlist/plib/ppreprocessor.cpp
parent52b8d5fd2b656c317e589da93467c33be74e76ea (diff)
parente949e9c29de82ee7c32692e7b65da05dd22bdc9d (diff)
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'src/lib/netlist/plib/ppreprocessor.cpp')
-rw-r--r--src/lib/netlist/plib/ppreprocessor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/netlist/plib/ppreprocessor.cpp b/src/lib/netlist/plib/ppreprocessor.cpp
index f13d3aeef43..b563576c6a8 100644
--- a/src/lib/netlist/plib/ppreprocessor.cpp
+++ b/src/lib/netlist/plib/ppreprocessor.cpp
@@ -461,7 +461,7 @@ namespace plib {
m_if_level++;
lt = replace_macros(lt);
simple_iter<ppreprocessor> t(this, tokenize(lt.substr(3), m_expr_sep, true, true));
- auto val = static_cast<int>(prepro_expr(t, 255));
+ auto val = narrow_cast<int>(prepro_expr(t, 255));
t.skip_ws();
if (!t.eod())
error("found unprocessed content at end of line");
@@ -489,7 +489,7 @@ namespace plib {
m_if_flag ^= (1 << m_if_level);
lt = replace_macros(lt);
simple_iter<ppreprocessor> t(this, tokenize(lt.substr(5), m_expr_sep, true, true));
- auto val = static_cast<int>(prepro_expr(t, 255));
+ auto val = narrow_cast<int>(prepro_expr(t, 255));
t.skip_ws();
if (!t.eod())
error("found unprocessed content at end of line");
@@ -559,7 +559,7 @@ namespace plib {
auto *prevdef = get_define(n);
if (lti.size() == 2)
{
- if (prevdef != nullptr && prevdef->m_replace != "")
+ if (prevdef != nullptr && !prevdef->m_replace.empty())
error("redefinition of " + n);
m_defines.insert({n, define_t(n, "")});
}