ENH: accept reading unquoted string (ie, word)
- makes string reading consistent with fileName reading. Related to #3133 to also allow compatibility when reading existing dictionaries written with unquoted string contents.
This commit is contained in:
parent
e099e98b8b
commit
2d61127606
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -48,6 +48,11 @@ Foam::Istream& Foam::operator>>(Istream& is, string& val)
|
||||
{
|
||||
val = tok.stringToken();
|
||||
}
|
||||
else if (tok.isWord())
|
||||
{
|
||||
// Also accept a plain word as a string
|
||||
val = tok.wordToken();
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorInFunction(is);
|
||||
|
Loading…
Reference in New Issue
Block a user