mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: return Switch by value, not const-reference
This commit is contained in:
@ -56,7 +56,9 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
writeFile(obr_, name, valueType, dict),
|
||||
scaleFactor_(1.0),
|
||||
dict_(dict),
|
||||
regionName_(word::null)
|
||||
regionName_(word::null),
|
||||
fields_(),
|
||||
writeFields_(false)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
@ -74,7 +76,9 @@ Foam::functionObjects::fieldValue::fieldValue
|
||||
writeFile(obr_, name, valueType, dict),
|
||||
scaleFactor_(1.0),
|
||||
dict_(dict),
|
||||
regionName_(word::null)
|
||||
regionName_(word::null),
|
||||
fields_(),
|
||||
writeFields_(false)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -48,7 +48,6 @@ SourceFiles
|
||||
|
||||
#include "fvMeshFunctionObject.H"
|
||||
#include "writeFile.H"
|
||||
#include "Switch.H"
|
||||
#include "Field.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -86,7 +85,7 @@ protected:
|
||||
wordList fields_;
|
||||
|
||||
//- Output field values flag
|
||||
Switch writeFields_;
|
||||
bool writeFields_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
@ -167,7 +166,7 @@ public:
|
||||
inline const wordList& fields() const;
|
||||
|
||||
//- Return the output field values flag
|
||||
inline const Switch& writeFields() const;
|
||||
inline bool writeFields() const;
|
||||
|
||||
//- Read from dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -45,8 +46,7 @@ inline const Foam::wordList& Foam::functionObjects::fieldValue::fields() const
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::Switch&
|
||||
Foam::functionObjects::fieldValue::writeFields() const
|
||||
inline bool Foam::functionObjects::fieldValue::writeFields() const
|
||||
{
|
||||
return writeFields_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user