mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: align Enum methods with HashTable
- deprecate get(key, deflt) in favour of lookup(key, deflt).
Method name compatibility with HashTable.
- deprecate operator().
The meaning is too opaque and equally served by other means:
- use get(key) instead of operator()(key).
Const access whereas HashTable::operator()(key)
creates missing entry.
- lookup(key, deflt) - instead of operator()(key, deflt).
Const access whereas HashTable::operator()(key, deflt)
creates a missing entry.
- make Enum iterable to allow participation in range-for etc.
This commit is contained in:
@ -80,7 +80,7 @@ static enum Time::stopAtControls getStopAction(const std::string& filename)
|
||||
const word actionName(word::validate(fileContent.substr(equals+1)));
|
||||
|
||||
return
|
||||
Time::stopAtControlNames
|
||||
Time::stopAtControlNames.lookup
|
||||
(
|
||||
actionName,
|
||||
Time::stopAtControls::saUnknown
|
||||
|
||||
Reference in New Issue
Block a user