summaryrefslogtreecommitdiffstats
path: root/src/lib/netlist/plib/pstring.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/pstring.cpp
parent52b8d5fd2b656c317e589da93467c33be74e76ea (diff)
parente949e9c29de82ee7c32692e7b65da05dd22bdc9d (diff)
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'src/lib/netlist/plib/pstring.cpp')
-rw-r--r--src/lib/netlist/plib/pstring.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/netlist/plib/pstring.cpp b/src/lib/netlist/plib/pstring.cpp
index 5d26ed984aa..b0dc3d313c6 100644
--- a/src/lib/netlist/plib/pstring.cpp
+++ b/src/lib/netlist/plib/pstring.cpp
@@ -27,7 +27,7 @@ int pstring_t<F>::compare(const pstring_t &right) const noexcept
}
if (si != this->end() && ri != right.end())
- return static_cast<int>(*si) - static_cast<int>(*ri);
+ return plib::narrow_cast<int>(*si) - plib::narrow_cast<int>(*ri);
if (this->mem_t_size() > right.mem_t_size())
return 1;
if (this->mem_t_size() < right.mem_t_size())
@@ -45,8 +45,8 @@ pstring_t<F> pstring_t<F>::substr(size_type start, size_type nlen) const
{
if (nlen == npos || start + nlen > l)
nlen = l - start;
- auto ps = std::next(begin(), static_cast<difference_type>(start));
- auto pe = std::next(ps, static_cast<difference_type>(nlen));
+ auto ps = std::next(begin(), plib::narrow_cast<difference_type>(start));
+ auto pe = std::next(ps, plib::narrow_cast<difference_type>(nlen));
ret.m_str.assign(ps.p, pe.p);
}
return ret;