summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/putil.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-02-09 02:24:09 +0100
committer couriersud <couriersud@gmx.org>2019-02-09 23:07:27 +0100
commit9d8cb783e3477927db622e0eef63c6e2c3e3ace7 (patch)
tree5e6fbb76fe961ddc67dc3668a744080c2a712a4e /src/lib/netlist/plib/putil.cpp
parentac124a896b8dff99b6812eabbb8071c98d36a8f9 (diff)
netlist: more core guidelines work. (nw)
Diffstat (limited to 'src/lib/netlist/plib/putil.cpp')
-rw-r--r--src/lib/netlist/plib/putil.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/lib/netlist/plib/putil.cpp b/src/lib/netlist/plib/putil.cpp
index 03f730f6ba2..b62cbf60865 100644
--- a/src/lib/netlist/plib/putil.cpp
+++ b/src/lib/netlist/plib/putil.cpp
@@ -163,29 +163,6 @@ namespace plib
}
std::string penum_base::nthstr(int n, const char *str)
{
- char buf[64];
- char *bufp = buf;
- int cur = 0;
- while (*str)
- {
- if (cur == n)
- {
- if (*str == ',')
- {
- *bufp = 0;
- return pstring(buf);
- }
- else if (*str != ' ')
- *bufp++ = *str;
- }
- else
- {
- if (*str == ',')
- cur++;
- }
- str++;
- }
- *bufp = 0;
- return std::string(buf);
+ return psplit(str, ",", false)[static_cast<std::size_t>(n)];
}
} // namespace plib