diff options
author | 2017-03-31 18:07:35 +0200 | |
---|---|---|
committer | 2017-04-04 02:02:56 +0200 | |
commit | 58aa97913fa966b03d3b5bed77c6670e49821f1e (patch) | |
tree | 22aa0c6d2a40ed4a751226ae33d28db6ae149be3 /src/lib/netlist/plib/poptions.cpp | |
parent | 9e78adc115a11d4495d291b10d5177a9d06d62f2 (diff) |
pstring, pdynlib, pfmtlog refactoring :
pstring:
- added support for UTF16LE to pstring.
- renamed size() to mem_t_size()
- renmaed len() to length()
- added size() == length()
- added empty()
- added simple compare()
pfmtlog:
- Simplified pfmtlog, added more c++
pdynlib:
- add a dynproc type to dynlib to wrap dynamic library calls.
various:
- fix two coverty scan issue.
- various clang warnings fixed.
(nw)
Diffstat (limited to 'src/lib/netlist/plib/poptions.cpp')
-rw-r--r-- | src/lib/netlist/plib/poptions.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/netlist/plib/poptions.cpp b/src/lib/netlist/plib/poptions.cpp index c79fb28fe58..910660acb3d 100644 --- a/src/lib/netlist/plib/poptions.cpp +++ b/src/lib/netlist/plib/poptions.cpp @@ -136,7 +136,7 @@ namespace plib { std::size_t p = 1; opt = getopt_short(arg.substr(p, 1)); ++p; - if (p < arg.len()) + if (p < arg.length()) { has_equal_arg = true; opt_arg = arg.substr(p); @@ -184,7 +184,7 @@ namespace plib { pstring line = pstring("").rpad(" ", firstline_indent); for (auto &s : psplit(p, " ")) { - if (line.len() + s.len() > width) + if (line.length() + s.length() > width) { ret += line + "\n"; line = pstring("").rpad(" ", indent); @@ -228,14 +228,14 @@ namespace plib { { line += v + "|"; } - line = line.left(line.len() - 1); + line = line.left(line.length() - 1); } else line += "Value"; } } line = line.rpad(" ", indent - 2) + " "; - if (line.len() > indent) + if (line.length() > indent) { //ret += "TestGroup abc\n def gef\nxyz\n\n" ; ret += line + "\n"; @@ -259,7 +259,7 @@ namespace plib { ex += split_paragraphs(example->help(), width, 4, 4) + "\n"; } } - if (ex.len() > 0) + if (ex.length() > 0) { ret += "\n\nExamples:\n\n" + ex; } |