ISstream: Corrected parsing of variables

This commit is contained in:
Henry Weller
2023-06-20 19:14:47 +01:00
parent 23b169553c
commit c9bb53e109
2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,9 +48,9 @@ int main(int argc, char *argv[])
{
dictionary dict;
dict.add("aaOPENMPIcc", 1);
dict.add("aaOpenFOAMcc", 1);
string s("DDD${aa${WM_MPLIB}cc}EEE");
string s("DDD${aa${WM_PROJECT}cc}EEE");
stringOps::inplaceExpand(s, dict, true, false);
Info<< "variable expansion:" << s << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -570,7 +570,7 @@ Foam::Istream& Foam::ISstream::readVariable(string& str)
{
buf_.append(c);
int blockCount = 0;
int blockCount = 1;
if (c == token::BEGIN_BLOCK)
{