fix: nom de variable en Locale

This commit is contained in:
2026-03-22 09:21:45 +01:00
parent c6e2779429
commit cd0477cc4c
2 changed files with 7 additions and 7 deletions

View File

@@ -8,23 +8,23 @@
#include "game/options.hpp" // Para Options::console
// [SINGLETON]
Locale* Locale::locale_ = nullptr;
Locale* Locale::instance = nullptr;
// [SINGLETON] Crea el objeto con esta función estática
void Locale::init(const std::string& file_path) {
Locale::locale_ = new Locale();
Locale::locale_->loadFromFile(file_path);
Locale::instance = new Locale();
Locale::instance->loadFromFile(file_path);
}
// [SINGLETON] Destruye el objeto con esta función estática
void Locale::destroy() {
delete Locale::locale_;
Locale::locale_ = nullptr;
delete Locale::instance;
Locale::instance = nullptr;
}
// [SINGLETON] Con este método obtenemos el objeto y podemos trabajar con él
auto Locale::get() -> Locale* {
return Locale::locale_;
return Locale::instance;
}
// Devuelve la traducción de la clave o la clave como fallback