- setSize(const label)
* When the new size is greater than the addressed list size, the allocated
list sizes is adjusted and the addressed size does not change.
* Otherwise the addressed list size is just reduced and the allocated
size does not change. inline void setSize(const label);
- setSize(const label, const T&)
Disabled, since the usefulness and semantics are not quite clear
- operator=(const T&)
should not affect the allocated size (BUGFIX)
- expansion of a list beyond the currently addressed list size
changes both the allocated size and the addressed list size
- contracting list below the currently addressed list size
changes the addressed list size only.
If someone really wishes to increase the underlying allocated list size
without touching the addressed list size:
prevSize = myList.size();
myList.setSize(largerSize);
myList.setSize(prevSize);
or introduce an equivalent allocSize(const label) method if this is needed
setSize(const label)
- When the new size is smaller than the addressed list size, the addressed
list size is reduced and the allocated size does not change.
- Otherwise the allocated size is adjusted, but the addressed list size
does not change.
setSize(const label, const T&)
- When the new size is larger than the addressed list size, both allocated
and addressed list sizes are adjusted.
NOTE: it might be more consistent to have setSize(label) also adjust the
addressed list size. This also corresponds to what previous releases
did, although I don't know if anyone has relied upon any particular
behaviour