mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use string substr instead of string::operator()
- makes the purpose clearer. In some places, string::resize() is even simpler. - use C++11 string::back() in preference to str[str.size()-1]
This commit is contained in:
@ -221,6 +221,7 @@ redundantBlock {space}({comment}|{unknownPeriodicFace}|{periodicFace
|
||||
endOfSection {space}")"{space}
|
||||
|
||||
|
||||
/* balance "-quoted for editor */
|
||||
|
||||
/* ------------------------------------------------------------------------ *\
|
||||
----- Exclusive start states -----
|
||||
@ -693,7 +694,7 @@ endOfSection {space}")"{space}
|
||||
{lbrac}{label} {
|
||||
Warning
|
||||
<< "Found unknown block of type: "
|
||||
<< Foam::string(YYText())(1, YYLeng()-1) << nl
|
||||
<< std::string(YYText()).substr(1, YYLeng()-1) << nl
|
||||
<< " on line " << lineNo << endl;
|
||||
|
||||
yy_push_state(ignoreBlock);
|
||||
|
||||
Reference in New Issue
Block a user