From 718a001e6a962242b36172ebd0f478ee35b55288 Mon Sep 17 00:00:00 2001 From: Disservin Date: Sun, 14 Jun 2026 09:48:10 +0200 Subject: [PATCH] Fixup RelaxedAtomic operator Types As pointed out in https://github.com/official-stockfish/Stockfish/commit/0111d11e2356147bad21c1f890b271a30d10a580#r188197707, the parameter type should be `T` not `int` closes https://github.com/official-stockfish/Stockfish/pull/6896 No functional change --- src/misc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.h b/src/misc.h index 0a6a846c2..eee6858cb 100644 --- a/src/misc.h +++ b/src/misc.h @@ -381,7 +381,7 @@ class RelaxedAtomic { return inner; } - RelaxedAtomic& operator+=(int val) { + RelaxedAtomic& operator+=(T val) { T res = this->load(std::memory_order_relaxed) + val; this->store(res, std::memory_order_relaxed); return *this; @@ -411,7 +411,7 @@ class RelaxedAtomic { return val; } - RelaxedAtomic& operator-=(int val) { + RelaxedAtomic& operator-=(T val) { T res = this->load(std::memory_order_relaxed) - val; this->store(res, std::memory_order_relaxed); return *this;