ENH: new/revised emplace_back() [for DynamicList/List/PtrDynList/PtrList]

- returns reference as per C++17 std::vector

STYLE: drop unused, redundant DynamicField remove() method
This commit is contained in:
Mark Olesen
2023-01-26 11:24:25 +01:00
parent c1cdacc0b4
commit 7c60c80edd
28 changed files with 179 additions and 135 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2021-2022 OpenCFD Ltd.
Copyright (C) 2021-2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -181,7 +181,7 @@ int main(int argc, char *argv[])
DynamicList<label> globalIDs;
for (label i = 0; i < 100; i++)
{
globalIDs.append(rndGen.position(label(0), nTotalCells-1));
globalIDs.push_back(rndGen.position(label(0), nTotalCells-1));
}
// Get the cell centres at those cell indices