mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: trim both ends of codeStream entries
- improves consistency of SHA1 calculation
This commit is contained in:
@ -93,18 +93,18 @@ bool Foam::functionEntries::codeStream::execute
|
||||
string codeInclude;
|
||||
if (codeDict.found("codeInclude"))
|
||||
{
|
||||
codeInclude = stringOps::trimLeft(codeDict["codeInclude"]);
|
||||
codeInclude = stringOps::trim(codeDict["codeInclude"]);
|
||||
}
|
||||
|
||||
// "codeOptions" is optional
|
||||
string codeOptions;
|
||||
if (codeDict.found("codeOptions"))
|
||||
{
|
||||
codeOptions = stringOps::trimLeft(codeDict["codeOptions"]);
|
||||
codeOptions = stringOps::trim(codeDict["codeOptions"]);
|
||||
}
|
||||
|
||||
// "code" is mandatory
|
||||
string code = stringOps::trimLeft(codeDict["code"]);
|
||||
string code = stringOps::trim(codeDict["code"]);
|
||||
|
||||
// Create SHA1 digest from the contents
|
||||
SHA1Digest sha;
|
||||
|
||||
@ -95,18 +95,18 @@ void Foam::codedFixedValueFvPatchScalarField::writeLibrary
|
||||
string codeInclude;
|
||||
if (dict.found("codeInclude"))
|
||||
{
|
||||
codeInclude = stringOps::trimLeft(dict["codeInclude"]);
|
||||
codeInclude = stringOps::trim(dict["codeInclude"]);
|
||||
}
|
||||
|
||||
// "codeOptions" is optional
|
||||
string codeOptions;
|
||||
if (dict.found("codeOptions"))
|
||||
{
|
||||
codeOptions = stringOps::trimLeft(dict["codeOptions"]);
|
||||
codeOptions = stringOps::trim(dict["codeOptions"]);
|
||||
}
|
||||
|
||||
// "code" is mandatory
|
||||
string code = stringOps::trimLeft(dict["code"]);
|
||||
string code = stringOps::trim(dict["code"]);
|
||||
|
||||
// Create SHA1 digest from the contents
|
||||
SHA1Digest sha;
|
||||
|
||||
Reference in New Issue
Block a user