renombrades extensions .h a .hpp
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "enter_name.h"
|
||||
#include "enter_name.hpp"
|
||||
|
||||
#include <array> // Para array
|
||||
#include <cstdlib> // Para rand
|
||||
@@ -10,7 +10,7 @@ EnterName::EnterName()
|
||||
selected_index_(0) {}
|
||||
|
||||
// Inicializa el objeto
|
||||
void EnterName::init(const std::string &name) {
|
||||
void EnterName::init(const std::string& name) {
|
||||
name_ = sanitizeName(name);
|
||||
selected_index_ = 0;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ auto EnterName::getCarousel(int size) const -> std::string {
|
||||
}
|
||||
|
||||
// Valida y limpia el nombre: solo caracteres legales y longitud máxima
|
||||
auto EnterName::sanitizeName(const std::string &name) const -> std::string {
|
||||
auto EnterName::sanitizeName(const std::string& name) const -> std::string {
|
||||
std::string sanitized;
|
||||
|
||||
for (size_t i = 0; i < name.length() && sanitized.length() < MAX_NAME_SIZE; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user