diff --git a/applications/test/ITstream/Test-ITstream.cxx b/applications/test/ITstream/Test-ITstream.cxx index 4c343e2ec1..3e239ede7e 100644 --- a/applications/test/ITstream/Test-ITstream.cxx +++ b/applications/test/ITstream/Test-ITstream.cxx @@ -478,11 +478,14 @@ int main(int argc, char *argv[]) { - auto& empty = ITstream::emptyStream(); + auto& empty = ITstream::empty_stream(); Info<< "The empty stream:" << nl << " name: " << empty.name() << " good:" << empty.good() << " content:" << empty << nl; + + const token& tok0 = empty.peek(); + Info<< "First token from empty:" << tok0.info() << nl; } } diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C index 5fa8c588bb..2a8e1d676e 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C @@ -72,7 +72,7 @@ static label parseStream(ISstream& is, tokenList& tokens) // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // -Foam::ITstream& Foam::ITstream::emptyStream() +Foam::ITstream& Foam::ITstream::empty_stream() { if (emptyStreamPtr_) { diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H index e2f59353f3..4cc396c52c 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H @@ -197,9 +197,9 @@ public: // The returned stream has no tokens and has a 'bad' state, // to indicate that it is invalid for reading. // - // \caution the caller can still modify the its contents, + // \caution the caller is still able to modify its contents, // but they should not do that! - static ITstream& emptyStream(); + static ITstream& empty_stream(); //- Create token list by parsing the input character sequence //- until no good tokens remain. diff --git a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.C b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.C index 2214049c6b..3435ae8092 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.C +++ b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.C @@ -74,7 +74,7 @@ Foam::ITstream& Foam::dictionaryEntry::stream() const << abort(FatalIOError); // Need to return something - send back an empty stream - return ITstream::emptyStream(); + return ITstream::empty_stream(); }