mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
unecessary shrink
This commit is contained in:
@ -79,8 +79,9 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
|
|||||||
const label s
|
const label s
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (s < List<T>::size())
|
if (s <= List<T>::size())
|
||||||
{
|
{
|
||||||
|
// shrink addressable size, leave allocated size untouched
|
||||||
List<T>::size() = s;
|
List<T>::size() = s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -100,8 +101,9 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
|
|||||||
const T& t
|
const T& t
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (s < List<T>::size())
|
if (s <= List<T>::size())
|
||||||
{
|
{
|
||||||
|
// shrink addressable size, leave allocated size untouched
|
||||||
List<T>::size() = s;
|
List<T>::size() = s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user