style: aplicar checks modernize-* (215 fixes)
Cambios aplicados:
- [[nodiscard]] añadido a funciones que retornan valores
- .starts_with() en lugar de .find() == 0
- Inicializadores designados {.x=0, .y=0}
- auto en castings obvios
- = default para constructores triviales
- Funciones deleted movidas a public
- std::numbers::pi_v<float> (C++20)
Checks excluidos:
- use-trailing-return-type: Estilo controversial
- avoid-c-arrays: Arrays C aceptables en ciertos contextos
This commit is contained in:
@@ -25,8 +25,8 @@ void GestorPuntuacioFlotant::crear(int punts, const Punt& posicio) {
|
||||
// 2. Inicialitzar puntuació flotant
|
||||
pf->text = std::to_string(punts);
|
||||
pf->posicio = posicio;
|
||||
pf->velocitat = {Defaults::FloatingScore::VELOCITY_X,
|
||||
Defaults::FloatingScore::VELOCITY_Y};
|
||||
pf->velocitat = {.x = Defaults::FloatingScore::VELOCITY_X,
|
||||
.y = Defaults::FloatingScore::VELOCITY_Y};
|
||||
pf->temps_vida = 0.0F;
|
||||
pf->temps_max = Defaults::FloatingScore::LIFETIME;
|
||||
pf->brightness = 1.0F;
|
||||
|
||||
Reference in New Issue
Block a user