diff options
author | 2016-07-21 11:05:55 +0200 | |
---|---|---|
committer | 2016-07-21 11:05:55 +0200 | |
commit | 1e40d95e8b47d834d1ede706921dc19850aaaff2 (patch) | |
tree | f2e74d4451a527313fdc52f49b10955153f1dbd5 /src/lib/netlist/plib/poptions.cpp | |
parent | 7a69d48edd6e1f59c92271eb7fa217eaf0a714c7 (diff) |
Netlist updates:
- Removed trampolines (OUTLOGIC, INPLOGIC and friends).
- Started using doxygen comment and documentation style. Added doxygen
files to documentation folder.
- Refactored code triggered by doxygen output.
- Moved internal and support classes into namespace detail.
- Use an anordered map in parser.
- -Wconversion fixes - All done now.
- Fixed -Wold-style-cast warnings in netlist code.
- Added iterators to pstring.
- Moved two macros, added more RAII and improved exceptions. Fixed some
bugs in parser code.
- Fixed a number of bugs in parser code and exception handling.
[Couriersud]
Diffstat (limited to 'src/lib/netlist/plib/poptions.cpp')
-rw-r--r-- | src/lib/netlist/plib/poptions.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/netlist/plib/poptions.cpp b/src/lib/netlist/plib/poptions.cpp index e6bc45d15eb..2060e8ec46c 100644 --- a/src/lib/netlist/plib/poptions.cpp +++ b/src/lib/netlist/plib/poptions.cpp @@ -113,11 +113,13 @@ namespace plib { } else if (arg.startsWith("-")) { - opt = getopt_short(arg.substr(1,1)); - if (arg.len() > 2) + auto p = arg.begin() + 1; + opt = getopt_short(arg.substr(p,p + 1)); + ++p; + if (p != arg.end()) { has_equal_arg = true; - opt_arg = arg.substr(2); + opt_arg = arg.substr(p); } } else @@ -204,7 +206,7 @@ namespace plib { { line += v + "|"; } - line = line.left(line.len() - 1); + line = line.left(line.begin() + (line.len() - 1)); } else line += "Value"; |