ENH: add stringOps::inplaceRemoveSpace()

Style changes:
  - use std algorithm for some stringOps internals
  - pass SubStrings iterators by const reference

ENH: special nullptr handling for ISstream getLine
  - pass through to istream::ignore to support read and discard
This commit is contained in:
Mark Olesen
2020-02-19 14:16:45 +01:00
parent 6b3b6bb99f
commit 5f93f20652
12 changed files with 224 additions and 117 deletions

View File

@ -118,12 +118,12 @@ void Foam::Function1Types::CSV<Type>::read()
const label maxEntry =
max(refColumn_, componentColumns_[findMax(componentColumns_)]);
string line;
label lineNo = 0;
// Skip header
for (label i = 0; i < nHeaderLine_; ++i)
{
string line;
is.getLine(line);
++lineNo;
}
@ -133,7 +133,6 @@ void Foam::Function1Types::CSV<Type>::read()
while (is.good())
{
string line;
is.getLine(line);
++lineNo;