diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-25 22:31:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 22:31:32 +0100 |
commit | f3f6c62b147381873c2dfe2f239ef6111a3ac202 (patch) | |
tree | f442f4c85161f28f93819dc40030fa1b544731b2 /core | |
parent | b7b70004bc4d21eb3adfa71a143364ac3c6056d2 (diff) | |
parent | b1edb69249928d385f462543f3e0fa69d3037d2a (diff) |
Merge pull request #46424 from RandomShaper/fix_no_threads
Fix SafeNumeric::conditional_increment() for NO_THREADS
Diffstat (limited to 'core')
-rw-r--r-- | core/templates/safe_refcount.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h index cdc9908a5f..91a34ecd54 100644 --- a/core/templates/safe_refcount.h +++ b/core/templates/safe_refcount.h @@ -249,7 +249,7 @@ public: } _ALWAYS_INLINE_ T conditional_increment() { - if (value != 0) { + if (value == 0) { return 0; } else { return ++value; |