clang-tidy
This commit is contained in:
@@ -18,16 +18,16 @@ struct JA_Music_t; // lines 11-11
|
||||
struct JA_Sound_t; // lines 12-12
|
||||
|
||||
// Singleton
|
||||
Resource *Resource::instance_ = nullptr;
|
||||
Resource *Resource::instance = nullptr;
|
||||
|
||||
// Inicializa la instancia única del singleton
|
||||
void Resource::init() { Resource::instance_ = new Resource(); }
|
||||
void Resource::init() { Resource::instance = new Resource(); }
|
||||
|
||||
// Libera la instancia
|
||||
void Resource::destroy() { delete Resource::instance_; }
|
||||
void Resource::destroy() { delete Resource::instance; }
|
||||
|
||||
// Obtiene la instancia
|
||||
Resource *Resource::get() { return Resource::instance_; }
|
||||
Resource *Resource::get() { return Resource::instance; }
|
||||
|
||||
// Constructor
|
||||
Resource::Resource() : loading_text_(Screen::get()->getText()) { load(); }
|
||||
@@ -260,11 +260,11 @@ void Resource::addPalettes() {
|
||||
// Crea texturas a partir de textos para mostrar puntuaciones y mensajes
|
||||
void Resource::createTextures() {
|
||||
struct NameAndText {
|
||||
std::string name;
|
||||
std::string text;
|
||||
std::string name;
|
||||
std::string text;
|
||||
|
||||
NameAndText(const std::string &name_init, const std::string &text_init)
|
||||
: name(name_init), text(text_init) {}
|
||||
NameAndText(const std::string &name_init, const std::string &text_init)
|
||||
: name(name_init), text(text_init) {}
|
||||
};
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\n>> CREATING TEXTURES");
|
||||
@@ -303,12 +303,12 @@ void Resource::createTextures() {
|
||||
// Crea los objetos de texto a partir de los archivos de textura y texto
|
||||
void Resource::createText() {
|
||||
struct ResourceInfo {
|
||||
std::string key;
|
||||
std::string texture_file;
|
||||
std::string text_file;
|
||||
std::string key;
|
||||
std::string texture_file;
|
||||
std::string text_file;
|
||||
|
||||
ResourceInfo(const std::string &k, const std::string &t_file, const std::string &txt_file)
|
||||
: key(k), texture_file(t_file), text_file(txt_file) {}
|
||||
ResourceInfo(const std::string &k, const std::string &t_file, const std::string &txt_file)
|
||||
: key(k), texture_file(t_file), text_file(txt_file) {}
|
||||
};
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\n>> CREATING TEXT OBJECTS");
|
||||
|
||||
Reference in New Issue
Block a user