mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fixup #remove functionEntry and revert e15e32fdb7d515b
- forgot to use readList in removeEntry, which caused the test failure.
- remaining problem:
it doesn't work as might be expected
This is the problem:
dict
{
foo xxx;
bar yyy;
}
dict
{
baz zzz;
#remove foo
}
This only removes 'foo' from the current scope (the second dict), since
it occurs before the dictionary merge does.
To remove from the final, merged dictionary, we'd need a new
deleteEntry type that would do the right thing on the merge before
self-destructing (ie, removing itself too).
This commit is contained in:
@ -71,7 +71,7 @@ boundaryField
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this should have no effect
|
// this should have no effect
|
||||||
//#remove $inactive
|
#remove inactive
|
||||||
|
|
||||||
inlet_7 { $active }
|
inlet_7 { $active }
|
||||||
#inputMode overwrite
|
#inputMode overwrite
|
||||||
@ -105,9 +105,9 @@ baz
|
|||||||
|
|
||||||
|
|
||||||
// this should work
|
// this should work
|
||||||
//#remove active
|
#remove active
|
||||||
|
|
||||||
// this should work too
|
// this should work too
|
||||||
//#remove ( bar baz )
|
#remove ( bar baz )
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -65,8 +65,8 @@ bool Foam::functionEntries::removeEntry::execute
|
|||||||
Istream& is
|
Istream& is
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wordList dictKeys = parentDict.toc();
|
wordList dictKeys = parentDict.toc();
|
||||||
wordReList patterns(is);
|
wordReList patterns = readList<wordRe>(is);
|
||||||
|
|
||||||
labelList indices = findStrings(patterns, dictKeys);
|
labelList indices = findStrings(patterns, dictKeys);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user