Pasaeta de cppcheck, ale
This commit is contained in:
@@ -53,7 +53,8 @@ struct Circle
|
||||
struct Color
|
||||
{
|
||||
Uint8 r, g, b;
|
||||
constexpr Color(int red = 255, int green = 255, int blue = 255) : r(red), g(green), b(blue) {}
|
||||
constexpr Color() : r(0), g(0), b(0) {}
|
||||
explicit constexpr Color(int red, int green, int blue) : r(red), g(green), b(blue) {}
|
||||
};
|
||||
|
||||
// Posiciones de las notificaciones
|
||||
@@ -72,8 +73,8 @@ struct HiScoreEntry
|
||||
std::string name; // Nombre
|
||||
int score; // Puntuación
|
||||
|
||||
// Constructor
|
||||
HiScoreEntry(const std::string &n = "", int s = 0)
|
||||
// Constructor
|
||||
explicit HiScoreEntry(const std::string &n = "", int s = 0)
|
||||
: name(n), score(s) {}
|
||||
};
|
||||
|
||||
@@ -87,7 +88,7 @@ struct DemoKeys
|
||||
Uint8 fire_right;
|
||||
|
||||
// Constructor que inicializa todos los campos
|
||||
DemoKeys(Uint8 l = 0, Uint8 r = 0, Uint8 ni = 0, Uint8 f = 0, Uint8 fl = 0, Uint8 fr = 0)
|
||||
explicit DemoKeys(Uint8 l = 0, Uint8 r = 0, Uint8 ni = 0, Uint8 f = 0, Uint8 fl = 0, Uint8 fr = 0)
|
||||
: left(l), right(r), no_input(ni), fire(f), fire_left(fl), fire_right(fr) {}
|
||||
};
|
||||
|
||||
@@ -315,6 +316,9 @@ DemoData loadDemoDataFromFile(const std::string &file_path);
|
||||
bool saveDemoFile(const std::string &file_path, const DemoData &dd);
|
||||
#endif
|
||||
|
||||
// Obtiene el nombre de un fichero a partir de una ruta
|
||||
std::string getFileName(const std::string &path);
|
||||
|
||||
// Colores
|
||||
extern const Color bg_color;
|
||||
extern const Color no_color;
|
||||
|
||||
Reference in New Issue
Block a user