Pasaeta de cppcheck, ale

This commit is contained in:
2024-10-22 09:24:19 +02:00
parent 1d0c2e01a5
commit 5df85e1b1a
28 changed files with 164 additions and 194 deletions

View File

@@ -14,7 +14,7 @@
Notifier *Notifier::notifier_ = nullptr;
// [SINGLETON] Crearemos el objeto screen con esta función estática
void Notifier::init(std::string icon_file, std::shared_ptr<Text> text, const std::string &sound_file)
void Notifier::init(const std::string &icon_file, std::shared_ptr<Text> text, const std::string &sound_file)
{
Notifier::notifier_ = new Notifier(icon_file, text, sound_file);
}
@@ -165,7 +165,7 @@ void Notifier::clearFinishedNotifications()
}
}
void Notifier::showText(std::string text1, std::string text2, int icon, std::string code)
void Notifier::showText(std::string text1, std::string text2, int icon, const std::string &code)
{
// Cuenta el número de textos a mostrar
const int num_texts = !text1.empty() + !text2.empty();
@@ -286,7 +286,7 @@ void Notifier::showText(std::string text1, std::string text2, int icon, std::str
}
// Escribe el texto de la notificación
Color color = {255, 255, 255};
Color color{255, 255, 255};
if (num_texts == 2)
{ // Dos lineas de texto
text_->writeColored(padding_in_h + icon_space, padding_in_v, text1, color);