mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DynamicList: cosmetics
- using SizeInc to define the granularity in the SizeMult=0 needed?
This commit is contained in:
@ -126,15 +126,24 @@ int main(int argc, char *argv[])
|
||||
<< " " << dlB.size() << "/" << dlB.capacity() << endl;
|
||||
|
||||
|
||||
// dlB.append(dlB);
|
||||
// Info<< "appended to itself:" << endl;
|
||||
// Info<< "<dlB>" << dlB << "</dlB>" << nl << "sizes: "
|
||||
// << " " << dlB.size() << "/" << dlB.capacity() << endl;
|
||||
// Copy back and append a few time
|
||||
for (label i=0; i < 3; i++)
|
||||
{
|
||||
dlB.append(lstA);
|
||||
}
|
||||
|
||||
// dlB = dlB;
|
||||
// Info<< "self assignment:" << endl;
|
||||
// Info<< "<dlB>" << dlB << "</dlB>" << nl << "sizes: "
|
||||
// << " " << dlB.size() << "/" << dlB.capacity() << endl;
|
||||
|
||||
// check allocation granularity
|
||||
DynamicList<label, 6, 0> dlC;
|
||||
|
||||
Info<< "<dlC>" << dlC << "</dlC>" << nl << "sizes: "
|
||||
<< " " << dlC.size() << "/" << dlC.capacity() << endl;
|
||||
|
||||
dlC.reserve(dlB.size());
|
||||
dlC = dlB;
|
||||
|
||||
Info<< "<dlC>" << dlC << "</dlC>" << nl << "sizes: "
|
||||
<< " " << dlC.size() << "/" << dlC.capacity() << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user