CPUThreadConfigCallback: Use maximum value of size_t instead of -1 as default value ConfigChangedCallbackID

Co-Authored-By: OatmealDome <OatmealDome@users.noreply.github.com>
This commit is contained in:
Simonx22 2025-11-08 22:44:58 -05:00
parent 4f849ec827
commit bd93c09e38

View File

@ -3,6 +3,8 @@
#pragma once #pragma once
#include <limits>
#include "Common/Config/Config.h" #include "Common/Config/Config.h"
// This file lets you register callbacks like in Common/Config/Config.h, with the difference that // This file lets you register callbacks like in Common/Config/Config.h, with the difference that
@ -13,7 +15,7 @@ namespace CPUThreadConfigCallback
{ {
struct ConfigChangedCallbackID struct ConfigChangedCallbackID
{ {
size_t id = -1; size_t id = std::numeric_limits<size_t>::max();
bool operator==(const ConfigChangedCallbackID&) const = default; bool operator==(const ConfigChangedCallbackID&) const = default;
}; };