Commit c49e93d4 authored by mattijs's avatar mattijs
Browse files

unecessary shrink

parent 682c247e
......@@ -79,8 +79,9 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
const label s
)
{
if (s < List<T>::size())
if (s <= List<T>::size())
{
// shrink addressable size, leave allocated size untouched
List<T>::size() = s;
}
else
......@@ -100,8 +101,9 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
const T& t
)
{
if (s < List<T>::size())
if (s <= List<T>::size())
{
// shrink addressable size, leave allocated size untouched
List<T>::size() = s;
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment