passant linters a vore si trobe variables sense inicialitzar
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "utils.h" // Para getFileName, printWithDots
|
||||
|
||||
// Constructor
|
||||
Text::Text(std::shared_ptr<Texture> texture, const std::string &text_file) {
|
||||
Text::Text(const std::shared_ptr<Texture> &texture, const std::string &text_file) {
|
||||
// Carga los offsets desde el fichero
|
||||
auto tf = loadFile(text_file);
|
||||
|
||||
@@ -35,7 +35,7 @@ Text::Text(std::shared_ptr<Texture> texture, const std::string &text_file) {
|
||||
}
|
||||
|
||||
// Constructor
|
||||
Text::Text(std::shared_ptr<Texture> texture, std::shared_ptr<Text::File> text_file) {
|
||||
Text::Text(const std::shared_ptr<Texture> &texture, const std::shared_ptr<Text::File> &text_file) {
|
||||
// Inicializa variables desde la estructura
|
||||
box_height_ = text_file->box_height;
|
||||
box_width_ = text_file->box_width;
|
||||
@@ -261,7 +261,7 @@ auto Text::loadFile(const std::string &file_path) -> std::shared_ptr<Text::File>
|
||||
|
||||
// El fichero no se puede abrir
|
||||
else {
|
||||
std::cerr << "Error: Fichero no encontrado " << getFileName(file_path) << std::endl;
|
||||
std::cerr << "Error: Fichero no encontrado " << getFileName(file_path) << '\n';
|
||||
throw std::runtime_error("Fichero no encontrado: " + getFileName(file_path));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user