mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more consistent use of good() or direct testing instead valid()
This commit is contained in:
@ -17,7 +17,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
|
||||
vf,
|
||||
dir,
|
||||
"reconstruct("
|
||||
+ (reconFieldName != word::null ? reconFieldName : vf.name())
|
||||
+ (reconFieldName.empty() ? vf.name() : reconFieldName)
|
||||
+ ')'
|
||||
)
|
||||
);
|
||||
|
||||
@ -61,7 +61,7 @@ void basicTests(const coordinateSystem& cs)
|
||||
|
||||
if (const auto* cartptr = isA<coordSystem::cartesian>(cs))
|
||||
{
|
||||
if (!cartptr->valid())
|
||||
if (!cartptr->good())
|
||||
{
|
||||
Info<< "invalid cartesian = " << (*cartptr)
|
||||
<< " with: " << (*cartptr).R() << nl;
|
||||
|
||||
@ -221,7 +221,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
blockMesh blocks(meshDict, regionName, strategy, args.verbose());
|
||||
|
||||
if (!blocks.valid())
|
||||
if (!blocks.good())
|
||||
{
|
||||
// Could/should be Fatal?
|
||||
|
||||
|
||||
@ -979,7 +979,7 @@ int main(int argc, char *argv[])
|
||||
// Change the front and back patch types as required
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
word frontBackType(word::null);
|
||||
word frontBackType;
|
||||
|
||||
if (isType<extrudeModels::wedge>(model()))
|
||||
{
|
||||
|
||||
@ -947,7 +947,7 @@ void addZoneSidePatches
|
||||
|
||||
forAll(zoneSidePatch, zoneI)
|
||||
{
|
||||
if (oneDPolyPatchType != word::null)
|
||||
if (!oneDPolyPatchType.empty())
|
||||
{
|
||||
// Reuse single empty patch.
|
||||
word patchName;
|
||||
|
||||
@ -47,7 +47,7 @@ void Foam::DelaunayMesh<Triangulation>::timeCheck
|
||||
<< time().elapsedCpuTime() << " s, "
|
||||
<< "delta " << time().cpuTimeIncrement()<< " s";
|
||||
|
||||
if (description != word::null)
|
||||
if (!description.empty())
|
||||
{
|
||||
Info<< ", " << description << " ";
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ template<class KeyType, class DataType>
|
||||
Foam::PrintTable<KeyType, DataType>::PrintTable()
|
||||
:
|
||||
table_(),
|
||||
title_(string::null)
|
||||
title_()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ void Foam::conformalVoronoiMesh::timeCheck
|
||||
<< runTime.elapsedCpuTime() << " s, "
|
||||
<< "delta " << runTime.cpuTimeIncrement()<< " s";
|
||||
|
||||
if (description != word::null)
|
||||
if (!description.empty())
|
||||
{
|
||||
Info<< ", " << description << " ";
|
||||
}
|
||||
|
||||
@ -92,8 +92,8 @@ void Foam::helpTypes::helpBoundary::execute
|
||||
{
|
||||
setEnv("FOAM_ABORT", "", true);
|
||||
|
||||
word condition(word::null);
|
||||
word fieldName(word::null);
|
||||
word condition;
|
||||
word fieldName;
|
||||
|
||||
if (args.readIfPresent("browse", condition))
|
||||
{
|
||||
|
||||
@ -72,7 +72,7 @@ void Foam::helpTypes::helpFunctionObject::execute
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
word function(word::null);
|
||||
word function;
|
||||
|
||||
if (args.readIfPresent("browse", function))
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ void Foam::helpTypes::helpSolver::execute
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
word solver(word::null);
|
||||
word solver;
|
||||
|
||||
if (args.readIfPresent("browse", solver))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user