diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-27 01:05:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 01:05:18 +0200 |
commit | eaaff9da3178fa515a0f051fda932c1dd04d53db (patch) | |
tree | 56173535c376e0324f89baccf4bc14b2580ead23 /core/safe_refcount.h | |
parent | d8c96461183f0dc3208c3d624674fa4544212ea5 (diff) | |
parent | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (diff) | |
download | redot-engine-eaaff9da3178fa515a0f051fda932c1dd04d53db.tar.gz |
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
Diffstat (limited to 'core/safe_refcount.h')
-rw-r--r-- | core/safe_refcount.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/safe_refcount.h b/core/safe_refcount.h index f6b8f80271..54f540b0c7 100644 --- a/core/safe_refcount.h +++ b/core/safe_refcount.h @@ -189,11 +189,7 @@ public: _ALWAYS_INLINE_ bool unref() { // true if must be disposed of - if (atomic_decrement(&count) == 0) { - return true; - } - - return false; + return atomic_decrement(&count) == 0; } _ALWAYS_INLINE_ uint32_t get() const { // nothrow |