mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use std::string for parameters in ISstream internal members
This commit is contained in:
committed by
Andrew Heather
parent
46225279c0
commit
92c0ab4ed8
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user