mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: various reinterpret_cast to enable strict-aliasing
This commit is contained in:
@ -1008,7 +1008,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::T() const
|
||||
"const volScalarField& kinematicSingleLayer::T() const"
|
||||
) << "T field not available for " << type() << abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volScalarField&>(null);
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
@ -1020,7 +1020,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::cp() const
|
||||
"const volScalarField& kinematicSingleLayer::cp() const"
|
||||
) << "cp field not available for " << type() << abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volScalarField&>(null);
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ const Foam::volVectorField& Foam::surfaceFilmModels::noFilm::U() const
|
||||
"const volScalarField& noFilm::U() const"
|
||||
) << "U field not available for " << type() << abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volVectorField&>(null);
|
||||
return volVectorField::null();
|
||||
}
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::rho() const
|
||||
"const volScalarField& noFilm::rho() const"
|
||||
) << "rho field not available for " << type() << abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volScalarField&>(null);
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::T() const
|
||||
"const Foam::volScalarField& Foam::noFilm::T() const"
|
||||
) << "T field not available for " << type() << abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volScalarField&>(null);
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ const Foam::volScalarField& Foam::surfaceFilmModels::noFilm::cp() const
|
||||
"const volScalarField& noFilm::cp() const"
|
||||
) << "cp field not available for " << type() << abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volScalarField&>(null);
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ Foam::surfaceFilmModels::noFilm::massForPrimary() const
|
||||
) << "massForPrimary field not available for " << type()
|
||||
<< abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volScalarField&>(null);
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@ Foam::surfaceFilmModels::noFilm::diametersForPrimary() const
|
||||
) << "diametersForPrimary field not available for " << type()
|
||||
<< abort(FatalError);
|
||||
|
||||
return reinterpret_cast<const volScalarField&>(null);
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user