diff --git a/applications/test/HashTable2/Test-HashTable2.C b/applications/test/HashTable2/Test-HashTable2.C index 19406361fc..bcc6913b86 100644 --- a/applications/test/HashTable2/Test-HashTable2.C +++ b/applications/test/HashTable2/Test-HashTable2.C @@ -124,11 +124,11 @@ int main(int argc, char *argv[]) << "toc: " << flatOutput(table0.toc()) << nl; HashTable> table2 - ({ - {3, 10}, - {5, 12}, - {7, 16} - }); + ( + // From key/value pairs + labelList({3, 5, 7}), + labelList({10, 12, 16}) + ); Info<< "table2: " << table2 << nl << "toc: " << flatOutput(table2.toc()) << nl; diff --git a/applications/test/cstring/Make/files b/applications/test/cstring/Make/files index eb7e33dc8b..f98b8f1b1a 100644 --- a/applications/test/cstring/Make/files +++ b/applications/test/cstring/Make/files @@ -1,3 +1,3 @@ -Test-cstring.C +Test-cstring.cxx EXE = $(FOAM_USER_APPBIN)/Test-cstring diff --git a/applications/test/cstring/Test-cstring.C b/applications/test/cstring/Test-cstring.cxx similarity index 89% rename from applications/test/cstring/Test-cstring.C rename to applications/test/cstring/Test-cstring.cxx index 095a2253a1..002300e009 100644 --- a/applications/test/cstring/Test-cstring.C +++ b/applications/test/cstring/Test-cstring.cxx @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2017 OpenCFD Ltd. + Copyright (C) 2016-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -81,8 +81,7 @@ int print(char *argv[]) int main(int argc, char *argv[]) { - DynamicList dynlst; - dynlst.reserve(16); + DynamicList dynlst(16); dynlst.push_back("string1 with content"); dynlst.push_back("string2 other content"); @@ -104,6 +103,18 @@ int main(int argc, char *argv[]) Info<< nl; } + { + CStringList inC({ "string1", "string2", "string3", "end" }); + + Info<< "null-terminated string list from " << nl; + print(inC.strings()); + + Info<< "sublist: starting at " << inC.size()/2 << nl; + print(inC.strings(inC.size()/2)); + + Info<< nl; + } + { string testInput ( @@ -124,7 +135,7 @@ int main(int argc, char *argv[]) Info<< nl; } - Info<<"command-line with " << CStringList::count(argv) << " items"<< endl; + Info<< "command-line with " << CStringList::count(argv) << " items" << nl; print(argc, argv); diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 77331991ab..b4f6e8d6fe 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2020-2023 OpenCFD Ltd. + Copyright (C) 2020-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -98,19 +98,6 @@ bool skipSection(IFstream& inFile) } -void renumber -( - const Map