STYLE: check autoPtr as plain bool instead of valid()

- cleaner code, more similarity with unique_ptr

  Now
      if (ptr)
      if (!ptr)

  instead
      if (ptr.valid())
      if (!ptr.valid())
This commit is contained in:
Mark Olesen
2020-07-15 08:50:57 +02:00
parent 9af3f85cf9
commit 12c91b9472
144 changed files with 483 additions and 470 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2015 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -85,7 +86,7 @@ Foam::word Foam::orderedPhasePair::name() const
Foam::tmp<Foam::volScalarField> Foam::orderedPhasePair::E() const
{
if (!aspectRatio_.valid())
if (!aspectRatio_)
{
FatalErrorInFunction
<< "Aspect ratio model not specified for " << *this << "."