From 58aa97913fa966b03d3b5bed77c6670e49821f1e Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 31 Mar 2017 18:07:35 +0200 Subject: 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) --- src/lib/netlist/plib/poptions.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/netlist/plib/poptions.cpp') 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; } -- cgit v1.2.3-70-g09d2