mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: add const_cast when deleting pointers in objectRegistry
- makes the intention clearer, allows for future tightening of iterator access rules.
This commit is contained in:
committed by
Andrew Heather
parent
a1ee14690b
commit
2259fd845c
@ -370,7 +370,7 @@ bool Foam::objectRegistry::erase(const iterator& iter)
|
||||
|
||||
if (iter.found())
|
||||
{
|
||||
regIOobject* ptr = iter.val();
|
||||
regIOobject* ptr = const_cast<iterator&>(iter).val();
|
||||
|
||||
const bool ok = HashTable<regIOobject*>::erase(iter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user