mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: simplify SubStrings class/handling (remove template parameters)
- previous code used derived string iterators, but these would be largely ignored anyhow since the underlying std::sub_match str() method would just yields a std::string anyhow. The SubStrings::str(size_t) method wasn't used in any code, so now just use std::string iterators only. This change simplfies overall handling, since it removes an unneeded template dependency.
This commit is contained in:
@ -1,3 +1,3 @@
|
||||
Test-HashTable1.C
|
||||
Test-HashTable1.cxx
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/Test-HashTable1
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
Test-string.C
|
||||
Test-string.cxx
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/Test-string
|
||||
|
||||
@ -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;
|
||||
@ -1,3 +1,3 @@
|
||||
Test-stringList.C
|
||||
Test-stringList.cxx
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/Test-stringList
|
||||
|
||||
@ -43,7 +43,7 @@ template<class StringType>
|
||||
void printSubStrings
|
||||
(
|
||||
const StringType& str,
|
||||
const SubStrings<StringType>& split
|
||||
const SubStrings& split
|
||||
)
|
||||
{
|
||||
Info<< "string {" << str.size() << " chars} = " << str << nl
|
||||
|
||||
Reference in New Issue
Block a user