cppcheck
This commit is contained in:
@@ -3,23 +3,20 @@
|
||||
#include "core/rendering/text.h" // for Text
|
||||
|
||||
// Constructor
|
||||
Writer::Writer(Text *text) {
|
||||
// Copia los punteros
|
||||
this->text = text;
|
||||
|
||||
// Inicializa variables
|
||||
posX = 0;
|
||||
posY = 0;
|
||||
kerning = 0;
|
||||
caption = "";
|
||||
speed = 0;
|
||||
writingCounter = 0;
|
||||
index = 0;
|
||||
lenght = 0;
|
||||
completed = false;
|
||||
enabled = false;
|
||||
enabledCounter = 0;
|
||||
finished = false;
|
||||
Writer::Writer(Text *text)
|
||||
: text(text),
|
||||
posX(0),
|
||||
posY(0),
|
||||
kerning(0),
|
||||
caption(""),
|
||||
speed(0),
|
||||
writingCounter(0),
|
||||
index(0),
|
||||
lenght(0),
|
||||
completed(false),
|
||||
enabled(false),
|
||||
enabledCounter(0),
|
||||
finished(false) {
|
||||
}
|
||||
|
||||
// Actualiza el objeto
|
||||
@@ -73,7 +70,7 @@ void Writer::setKerning(int value) {
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void Writer::setCaption(std::string text) {
|
||||
void Writer::setCaption(const std::string &text) {
|
||||
caption = text;
|
||||
lenght = text.length();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user