mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp
The deprecated non-const tmp functionality is now on the compiler switch NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC in the Make/options file. However, it is recommended to upgrade all code to the new safer tmp by using the '.ref()' member function rather than the non-const '()' dereference operator when non-const access to the temporary object is required. Please report any problems on Mantis. Henry G. Weller CFD Direct.
This commit is contained in:
@ -76,7 +76,7 @@ Foam::fvFieldDecomposer::decomposeField
|
||||
patchFields
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
|
||||
GeometricField<Type, fvPatchField, volMesh>& resF = tresF.ref();
|
||||
|
||||
|
||||
// 2. Change the fvPatchFields to the correct type using a mapper
|
||||
@ -246,7 +246,7 @@ Foam::fvFieldDecomposer::decomposeField
|
||||
patchFields
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF();
|
||||
GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF.ref();
|
||||
|
||||
|
||||
// 2. Change the fvsPatchFields to the correct type using a mapper
|
||||
|
||||
@ -55,7 +55,7 @@ Foam::tmp<Foam::IOField<Type>> Foam::reconstructLagrangianField
|
||||
Field<Type>(0)
|
||||
)
|
||||
);
|
||||
Field<Type>& field = tfield();
|
||||
Field<Type>& field = tfield.ref();
|
||||
|
||||
forAll(meshes, i)
|
||||
{
|
||||
@ -115,7 +115,7 @@ Foam::reconstructLagrangianFieldField
|
||||
Field<Field<Type>>(0)
|
||||
)
|
||||
);
|
||||
Field<Field<Type>>& field = tfield();
|
||||
Field<Field<Type>>& field = tfield.ref();
|
||||
|
||||
forAll(meshes, i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user