STYLE: return Switch by value, not const-reference

This commit is contained in:
Mark Olesen
2020-02-21 11:44:29 +01:00
parent 86fe2b7bc9
commit 4e6caf8d61
23 changed files with 87 additions and 78 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2015 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -57,7 +58,6 @@ SourceFiles
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cellShapeControl Declaration
\*---------------------------------------------------------------------------*/
@ -121,7 +121,7 @@ public:
// Access
inline const scalar& defaultCellSize() const;
inline scalar defaultCellSize() const;
inline cellShapeControlMesh& shapeControlMesh();
@ -131,7 +131,7 @@ public:
inline const cellSizeAndAlignmentControls& sizeAndAlignment() const;
inline const scalar& minimumCellSize() const;
inline scalar minimumCellSize() const;
// Query

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012-2015 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -41,7 +42,7 @@ Foam::cellShapeControl::shapeControlMesh() const
}
inline const Foam::scalar& Foam::cellShapeControl::defaultCellSize() const
inline Foam::scalar Foam::cellShapeControl::defaultCellSize() const
{
return defaultCellSize_;
}
@ -61,7 +62,7 @@ Foam::cellShapeControl::sizeAndAlignment() const
}
inline const Foam::scalar& Foam::cellShapeControl::minimumCellSize() const
inline Foam::scalar Foam::cellShapeControl::minimumCellSize() const
{
return minimumCellSize_;
}