clang-tidy modernize
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
|
||||
#include <algorithm> // Para remove_if
|
||||
#include <string> // Para basic_string, string
|
||||
#include <vector> // Para vector
|
||||
#include <utility>
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "audio.h" // Para Audio
|
||||
#include "param.h" // Para Param, param, ParamNotification, ParamGame
|
||||
@@ -23,13 +24,13 @@ void Notifier::init(const std::string &icon_file, std::shared_ptr<Text> text) {
|
||||
void Notifier::destroy() { delete Notifier::instance; }
|
||||
|
||||
// Obtiene la instancia
|
||||
Notifier *Notifier::get() { return Notifier::instance; }
|
||||
auto Notifier::get() -> Notifier * { return Notifier::instance; }
|
||||
|
||||
// Constructor
|
||||
Notifier::Notifier(std::string icon_file, std::shared_ptr<Text> text)
|
||||
: renderer_(Screen::get()->getRenderer()),
|
||||
icon_texture_(!icon_file.empty() ? std::make_unique<Texture>(renderer_, icon_file) : nullptr),
|
||||
text_(text),
|
||||
text_(std::move(text)),
|
||||
bg_color_(param.notification.color),
|
||||
wait_time_(150),
|
||||
stack_(false),
|
||||
@@ -264,7 +265,7 @@ void Notifier::clearAllNotifications() {
|
||||
}
|
||||
|
||||
// Obtiene los códigos de las notificaciones
|
||||
std::vector<std::string> Notifier::getCodes() {
|
||||
auto Notifier::getCodes() -> std::vector<std::string> {
|
||||
std::vector<std::string> codes;
|
||||
for (const auto ¬ification : notifications_) {
|
||||
codes.emplace_back(notification.code);
|
||||
|
||||
Reference in New Issue
Block a user