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:
@@ -77,8 +77,8 @@ class ShipAnimator {
|
||||
|
||||
// Control de visibilitat
|
||||
void set_visible(bool visible);
|
||||
bool is_animation_complete() const;
|
||||
bool is_visible() const; // Comprova si alguna nau és visible
|
||||
[[nodiscard]] bool is_animation_complete() const;
|
||||
[[nodiscard]] bool is_visible() const; // Comprova si alguna nau és visible
|
||||
|
||||
private:
|
||||
SDL_Renderer* renderer_;
|
||||
@@ -92,7 +92,7 @@ class ShipAnimator {
|
||||
// Configuració
|
||||
void configurar_nau_p1(NauTitol& nau);
|
||||
void configurar_nau_p2(NauTitol& nau);
|
||||
Punt calcular_posicio_fora_pantalla(float angle_rellotge) const;
|
||||
[[nodiscard]] Punt calcular_posicio_fora_pantalla(float angle_rellotge) const;
|
||||
};
|
||||
|
||||
} // namespace Title
|
||||
|
||||
Reference in New Issue
Block a user