fix(common): add defination of COMMON::Utils::instance_

This commit is contained in:
Kieran Kihn
2025-11-16 20:50:42 +08:00
parent 8dbdbb395c
commit f06fee17cc

View File

@@ -12,11 +12,13 @@ namespace UNO::COMMON {
return gen_;
}
Utils* Utils::instance_ = nullptr;
Utils *Utils::getInstance() {
if (Utils::instance_ == nullptr) {
Utils::instance_ = new Utils();
if (instance_ == nullptr) {
instance_ = new Utils();
}
return Utils::instance_;
return instance_;
}
Random &Utils::getRandom() {
return this->random_;