File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,15 @@ class Metadata : public BaseMetadata {
51
51
using Iterator = typename MapType::iterator;
52
52
using ConstIterator = typename MapType::const_iterator;
53
53
54
- // Onlything we need to change to support lookups in parametrization
54
+ // The single place we need to change to support lookups in parametrization.
55
+ // Important: The non-const version will copy values from the global parametrization dictionary
56
+ // to the local one - It will always return an iterator to the local dictionary.
57
+ // This allows values to be modified in the local object directly.
58
+ //
59
+ // The const version will return either an iterator to the local object or the
60
+ // global parametrization dictionary.
61
+ // If keys are assumed to hold nested objects or large arrays which won't be modified anyway -
62
+ // it is reasonable to explicitly const-cast the object to select the const lookup version.
55
63
Iterator find (const KeyType& k) override ;
56
64
ConstIterator find (const KeyType& k) const override ;
57
65
You can’t perform that action at this time.
0 commit comments