diff options
Diffstat (limited to 'src/lib/netlist/plib/putil.cpp')
-rw-r--r-- | src/lib/netlist/plib/putil.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/netlist/plib/putil.cpp b/src/lib/netlist/plib/putil.cpp index 19f66ba6cbb..03f730f6ba2 100644 --- a/src/lib/netlist/plib/putil.cpp +++ b/src/lib/netlist/plib/putil.cpp @@ -2,13 +2,13 @@ // copyright-holders:Couriersud #include "putil.h" -#include "ptypes.h" #include "plists.h" +#include "ptypes.h" -#include <cstdlib> #include <algorithm> -#include <initializer_list> +#include <cstdlib> #include <cstring> +#include <initializer_list> namespace plib { @@ -17,7 +17,7 @@ namespace plib const pstring buildpath(std::initializer_list<pstring> list ) { pstring ret = ""; - for( auto elem : list ) + for( const auto &elem : list ) { if (ret == "") ret = elem; @@ -38,7 +38,7 @@ namespace plib else return pstring(std::getenv(var.c_str())); } - } + } // namespace util std::vector<pstring> psplit(const pstring &str, const pstring &onstr, bool ignore_empty) { @@ -102,7 +102,7 @@ namespace plib auto i = str.begin(); while (i != str.end()) { - std::size_t p = static_cast<std::size_t>(-1); + auto p = static_cast<std::size_t>(-1); for (std::size_t j=0; j < onstrl.size(); j++) { if (std::equal(onstrl[j].begin(), onstrl[j].end(), i)) @@ -161,7 +161,7 @@ namespace plib return cnt; return -1; } - pstring penum_base::nthstr(int n, const char *str) + std::string penum_base::nthstr(int n, const char *str) { char buf[64]; char *bufp = buf; @@ -186,6 +186,6 @@ namespace plib str++; } *bufp = 0; - return pstring(buf); + return std::string(buf); } } // namespace plib |