Commit 92c0ab4e authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

STYLE: use std::string for parameters in ISstream internal members

parent 46225279
......@@ -33,7 +33,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// Truncate error message for readability
static const unsigned errLen = 80;
static constexpr const unsigned errLen = 80;
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
......@@ -581,7 +581,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
}
Foam::Istream& Foam::ISstream::readVariable(string& str)
Foam::Istream& Foam::ISstream::readVariable(std::string& str)
{
static const unsigned maxLen = 1024;
static char buf[maxLen];
......@@ -698,14 +698,14 @@ Foam::Istream& Foam::ISstream::readVariable(string& str)
}
// Finalize
str = buf;
str.assign(buf, nChar);
putback(c);
return *this;
}
Foam::Istream& Foam::ISstream::readVerbatim(string& str)
Foam::Istream& Foam::ISstream::readVerbatim(std::string& str)
{
static const unsigned maxLen = 8000;
static char buf[maxLen];
......
......@@ -70,15 +70,14 @@ class ISstream
//- Get a word token
void readWordToken(token& t);
//- Read a verbatim string (excluding block delimiters).
// The leading "#{" has been removed prior to calling,
// continues until the closing "#}" has been found.
Istream& readVerbatim(string& str);
Istream& readVerbatim(std::string& str);
//- Read a variable name starting with '$'.
// Handles both "$var" and "${var}" forms.
Istream& readVariable(string& str);
// Handles "$var" and "${var}" forms, permits '/' scoping character.
Istream& readVariable(std::string& str);
//- No copy assignment
void operator=(const ISstream&) = delete;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment