diff --git a/applications/test/HashTable1/Make/files b/applications/test/HashTable1/Make/files index 05c776d65c..166975418b 100644 --- a/applications/test/HashTable1/Make/files +++ b/applications/test/HashTable1/Make/files @@ -1,3 +1,3 @@ -Test-HashTable1.C +Test-HashTable1.cxx EXE = $(FOAM_USER_APPBIN)/Test-HashTable1 diff --git a/applications/test/HashTable1/Test-HashTable1.C b/applications/test/HashTable1/Test-HashTable1.cxx similarity index 100% rename from applications/test/HashTable1/Test-HashTable1.C rename to applications/test/HashTable1/Test-HashTable1.cxx diff --git a/applications/test/string/Make/files b/applications/test/string/Make/files index 2bcadc3218..7c664b3968 100644 --- a/applications/test/string/Make/files +++ b/applications/test/string/Make/files @@ -1,3 +1,3 @@ -Test-string.C +Test-string.cxx EXE = $(FOAM_USER_APPBIN)/Test-string diff --git a/applications/test/string/Test-string.C b/applications/test/string/Test-string.cxx similarity index 98% rename from applications/test/string/Test-string.C rename to applications/test/string/Test-string.cxx index 72cd2ab178..605ec9136d 100644 --- a/applications/test/string/Test-string.C +++ b/applications/test/string/Test-string.cxx @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) inputType in1("move-construct-from"); - Info<<"move construct from " << in1.length() << nl; + Info<<"move construct from " << in1.size() << nl; outputType out1(std::move(in1)); @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) out1 = "some-text-rubbish"; out1.resize(10); - Info<<"move assign from " << in1.length() << nl; + Info<<"move assign from " << in1.size() << nl; out1 = std::move(in1); @@ -329,7 +329,7 @@ int main(int argc, char *argv[]) string s2(s.expand()); - cout<< "output string with " << s2.length() << " characters\n"; + cout<< "output string with " << s2.size() << " characters\n"; cout<< "ostream<< >" << s2 << "<\n"; Info<< "Ostream<< >" << s2 << "<\n"; Info<< "hash:" << hex << string::hasher()(s2) << dec << endl; diff --git a/applications/test/stringList/Make/files b/applications/test/stringList/Make/files index bcfa35a1f0..6e4f828cd5 100644 --- a/applications/test/stringList/Make/files +++ b/applications/test/stringList/Make/files @@ -1,3 +1,3 @@ -Test-stringList.C +Test-stringList.cxx EXE = $(FOAM_USER_APPBIN)/Test-stringList diff --git a/applications/test/stringList/Test-stringList.C b/applications/test/stringList/Test-stringList.cxx similarity index 100% rename from applications/test/stringList/Test-stringList.C rename to applications/test/stringList/Test-stringList.cxx diff --git a/applications/test/stringSplit/Test-stringSplit.cxx b/applications/test/stringSplit/Test-stringSplit.cxx index 14d4cab890..638219950b 100644 --- a/applications/test/stringSplit/Test-stringSplit.cxx +++ b/applications/test/stringSplit/Test-stringSplit.cxx @@ -43,7 +43,7 @@ template void printSubStrings ( const StringType& str, - const SubStrings& split + const SubStrings& split ) { Info<< "string {" << str.size() << " chars} = " << str << nl diff --git a/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C b/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C index 85de497991..e6d98f2991 100644 --- a/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C +++ b/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C @@ -645,7 +645,7 @@ bool Foam::fileFormats::ensightMeshReader::readGeometry // Parse all - SubStrings split; + SubStrings split; while (is.good()) { diff --git a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C index 4ff92cf77a..4d83c8133e 100644 --- a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C +++ b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019-2021 OpenCFD Ltd. + Copyright (C) 2019-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,7 +37,7 @@ Description #include "argList.H" #include "OFstream.H" -#include "StringStream.H" +#include "stringOps.H" #include "point.H" #include "DynamicList.H" @@ -58,58 +58,49 @@ string getLine(std::ifstream& is) } -// Read space-separated vertices (with optional '/' arguments) -labelList parseVertices(const string& line) +// Token list with one of the following: +// f v1 v2 v3 ... +// f v1/vt1 v2/vt2 v3/vt3 ... +// l v1 v2 v3 ... +// l v1/vt1 v2/vt2 v3/vt3 ... +static label readObjVertices +( + const SubStrings& tokens, + DynamicList