mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: simplify primitiveEntry parsing code, move append new tokens
- simplify string output code
This commit is contained in:
@ -160,13 +160,16 @@ bool Foam::functionEntry::execute
|
||||
void Foam::functionEntry::write(Ostream& os) const
|
||||
{
|
||||
// Contents should be single string token
|
||||
const token& t = operator[](0);
|
||||
const string& s = t.stringToken();
|
||||
const token& tok = operator[](0);
|
||||
const string& s = tok.stringToken();
|
||||
|
||||
for (size_t i = 0; i < s.size(); i++)
|
||||
// Write character-wise for literal output
|
||||
for (size_t i = 0; i < s.size(); ++i)
|
||||
{
|
||||
os.write(s[i]);
|
||||
}
|
||||
|
||||
os << nl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user