mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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.
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user