Commit fde93b66 authored by Mark Olesen's avatar Mark Olesen

STYLE: compile-type deprecate empty() method for autoPtr/tmp (#1775)

- autoPtr: less clutter using plain tests with the bool operator

    (!ptr)  vs  (ptr.empty())
    (ptr)   vs  (!ptr.empty())

- tmp: was entirely unused.
parent 35a0fd3e
......@@ -140,9 +140,12 @@ public:
// Member Functions
// Check
// Query
//- True if the managed pointer is null
//- Deprecated(2020-07) True if the managed pointer is null
//
// \deprecated(2020-07) - use bool operator
FOAM_DEPRECATED_FOR(2020-07, "bool operator")
bool empty() const noexcept { return !ptr_; }
//- True if the managed pointer is non-null
......
......@@ -49,7 +49,7 @@ See also
#include "refCount.H"
#include "word.H"
#include <utility>
#include "stdFoam.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -160,7 +160,10 @@ public:
// Query
//- True if a null pointer/reference
//- Deprecated(2020-07) True if a null managed pointer
//
// \deprecated(2020-07) - use bool operator
FOAM_DEPRECATED_FOR(2020-07, "bool operator")
bool empty() const noexcept { return !ptr_; }
//- True for non-null pointer/reference
......
......@@ -139,7 +139,10 @@ public:
// Query
//- True if a null pointer/reference
//- Deprecated(2020-07) True if a null managed pointer
//
// \deprecated(2020-07) - use bool operator
FOAM_DEPRECATED_FOR(2020-07, "bool operator")
bool empty() const noexcept { return !ptr_; }
//- True for non-null pointer/reference
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment