mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: consolidate, cleanup some string methods
- consolidate word::validated() into word::validate() and also allow as short form for string::validate<word>(). Also less confusing than having similarly named methods that essentially do the same thing. - more consistent const access when iterating over strings - add valid(char) for keyType and wordRe
This commit is contained in:
@ -235,7 +235,7 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
{
|
||||
args.append
|
||||
(
|
||||
string::validate<word>
|
||||
word::validate
|
||||
(
|
||||
funcNameArgs.substr(start, i - start)
|
||||
)
|
||||
@ -255,7 +255,7 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
}
|
||||
else if (c == '=')
|
||||
{
|
||||
argName = string::validate<word>
|
||||
argName = word::validate
|
||||
(
|
||||
funcNameArgs.substr(start, i - start)
|
||||
);
|
||||
@ -330,7 +330,7 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
|
||||
// Merge this functionObject dictionary into functionsDict
|
||||
dictionary funcArgsDict;
|
||||
funcArgsDict.add(string::validate<word>(funcNameArgs), funcDict);
|
||||
funcArgsDict.add(word::validate(funcNameArgs), funcDict);
|
||||
functionsDict.merge(funcArgsDict);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user