Mes recomanacions de cppcheck aplicades

Abans de tocar unes cosetes de strings buits
This commit is contained in:
2024-10-13 13:49:00 +02:00
parent b2122ac239
commit 46b19ee82f
22 changed files with 995 additions and 1062 deletions

View File

@@ -91,14 +91,14 @@ private:
bool checkAxisInput(InputType input, int controller_index = 0) const;
// Constructor
Input(std::string game_controller_db_path);
explicit Input(const std::string &game_controller_db_path);
// Destructor
~Input() = default;
public:
// [SINGLETON] Crearemos el objeto screen con esta función estática
static void init(std::string game_controller_db_path);
static void init(const std::string &game_controller_db_path);
// [SINGLETON] Destruiremos el objeto screen con esta función estática
static void destroy();
@@ -150,11 +150,8 @@ public:
std::string to_string(InputType input) const;
// Convierte un std::string a InputType
InputType to_inputs_e(std::string name) const;
InputType to_inputs_e(const std::string &name) const;
// Obtiene el indice a partir del nombre del mando
int getIndexByName(std::string name) const;
// Activa todos los inputs. Sirve para evitar inputs sin repeticiones pero que ya vienen pulsados cuando checkInput no estaba monitorizando
//void allActive(int index);
int getIndexByName(const std::string &name) const;
};