mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: make null constructed lists constexpr, noexcept
- can assist the compiler in producing tighter code.
This commit is contained in:
@ -60,7 +60,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null initializing count to 0
|
||||
refCount()
|
||||
constexpr refCount() noexcept
|
||||
:
|
||||
count_(0)
|
||||
{}
|
||||
@ -69,13 +69,13 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return the current reference count
|
||||
int count() const
|
||||
int count() const noexcept
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
||||
//- Return true if the reference count is zero
|
||||
bool unique() const
|
||||
bool unique() const noexcept
|
||||
{
|
||||
return !count_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user