Merge pull request #46424 from RandomShaper/fix_no_threads

Fix SafeNumeric::conditional_increment() for NO_THREADS
This commit is contained in:
Rémi Verschelde 2021-02-25 22:31:32 +01:00 committed by GitHub
commit f3f6c62b14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,7 +249,7 @@ public:
}
_ALWAYS_INLINE_ T conditional_increment() {
if (value != 0) {
if (value == 0) {
return 0;
} else {
return ++value;