DynamicList: cosmetics

- using SizeInc to define the granularity in the SizeMult=0 needed?
This commit is contained in:
Mark Olesen
2008-11-29 13:11:52 +01:00
parent 8b02802696
commit dee34f2775
6 changed files with 88 additions and 82 deletions

View File

@ -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;
}