mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use pointer checks for dynamicCast, refCast
- avoids try/catch exception handling STYLE: prefer refCast (shorter) to dynamicCast where possible
This commit is contained in:
@ -65,7 +65,7 @@ label writeDimFields
|
||||
{
|
||||
typedef VolumeInternalField<Type> FieldType;
|
||||
|
||||
const fvMesh& mesh = dynamicCast<const fvMesh>(ensMesh.mesh());
|
||||
const auto& mesh = refCast<const fvMesh>(ensMesh.mesh());
|
||||
|
||||
label count = 0;
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ label writeVolFields
|
||||
{
|
||||
typedef VolumeField<Type> FieldType;
|
||||
|
||||
const fvMesh& mesh = dynamicCast<const fvMesh>(ensMesh.mesh());
|
||||
const auto& mesh = refCast<const fvMesh>(ensMesh.mesh());
|
||||
|
||||
label count = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user