clang-tidy modernize
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <memory> // Para shared_ptr
|
||||
#include <string> // Para string
|
||||
#include <utility>
|
||||
|
||||
class Text;
|
||||
|
||||
@@ -9,33 +10,33 @@ class Text;
|
||||
class Writer {
|
||||
public:
|
||||
// Constructor
|
||||
explicit Writer(std::shared_ptr<Text> text)
|
||||
: text_(text) {}
|
||||
explicit Writer(std::shared_ptr<Text> text)
|
||||
: text_(std::move(text)) {}
|
||||
|
||||
// Destructor
|
||||
~Writer() = default;
|
||||
// Destructor
|
||||
~Writer() = default;
|
||||
|
||||
// Actualiza el objeto
|
||||
void update();
|
||||
// Actualiza el objeto
|
||||
void update();
|
||||
|
||||
// Dibuja el objeto en pantalla
|
||||
void render() const;
|
||||
// Dibuja el objeto en pantalla
|
||||
void render() const;
|
||||
|
||||
// Setters
|
||||
void setPosX(int value); // Establece la posición X
|
||||
void setPosY(int value); // Establece la posición Y
|
||||
void setKerning(int value); // Establece el kerning (espaciado entre caracteres)
|
||||
void setCaption(const std::string &text); // Establece el texto a escribir
|
||||
void setSpeed(int value); // Establece la velocidad de escritura
|
||||
void setEnabled(bool value); // Habilita o deshabilita el objeto
|
||||
void setFinishedCounter(int time); // Establece el temporizador para deshabilitar el objeto
|
||||
// Setters
|
||||
void setPosX(int value); // Establece la posición X
|
||||
void setPosY(int value); // Establece la posición Y
|
||||
void setKerning(int value); // Establece el kerning (espaciado entre caracteres)
|
||||
void setCaption(const std::string &text); // Establece el texto a escribir
|
||||
void setSpeed(int value); // Establece la velocidad de escritura
|
||||
void setEnabled(bool value); // Habilita o deshabilita el objeto
|
||||
void setFinishedCounter(int time); // Establece el temporizador para deshabilitar el objeto
|
||||
|
||||
// Centra la cadena de texto a un punto X
|
||||
void center(int x);
|
||||
// Centra la cadena de texto a un punto X
|
||||
void center(int x);
|
||||
|
||||
// Getters
|
||||
bool isEnabled() const; // Indica si el objeto está habilitado
|
||||
bool hasFinished() const; // Indica si ya ha terminado
|
||||
// Getters
|
||||
[[nodiscard]] auto isEnabled() const -> bool; // Indica si el objeto está habilitado
|
||||
[[nodiscard]] auto hasFinished() const -> bool; // Indica si ya ha terminado
|
||||
|
||||
private:
|
||||
// --- Objetos y punteros ---
|
||||
|
||||
Reference in New Issue
Block a user