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
This commit is contained in:
Disservin
2026-06-14 09:58:13 +02:00
parent 0dc19b61ae
commit 718a001e6a
+2 -2
View File
@@ -381,7 +381,7 @@ class RelaxedAtomic {
return inner; return inner;
} }
RelaxedAtomic& operator+=(int val) { RelaxedAtomic& operator+=(T val) {
T res = this->load(std::memory_order_relaxed) + val; T res = this->load(std::memory_order_relaxed) + val;
this->store(res, std::memory_order_relaxed); this->store(res, std::memory_order_relaxed);
return *this; return *this;
@@ -411,7 +411,7 @@ class RelaxedAtomic {
return val; return val;
} }
RelaxedAtomic& operator-=(int val) { RelaxedAtomic& operator-=(T val) {
T res = this->load(std::memory_order_relaxed) - val; T res = this->load(std::memory_order_relaxed) - val;
this->store(res, std::memory_order_relaxed); this->store(res, std::memory_order_relaxed);
return *this; return *this;