clang-tidy modernize
This commit is contained in:
@@ -54,16 +54,16 @@ class Item {
|
||||
void update();
|
||||
|
||||
// Getters
|
||||
float getPosX() const { return pos_x_; }
|
||||
float getPosY() const { return pos_y_; }
|
||||
int getWidth() const { return width_; }
|
||||
int getHeight() const { return height_; }
|
||||
ItemType getType() const { return type_; }
|
||||
bool isEnabled() const { return enabled_; }
|
||||
bool isOnFloor() const { return floor_collision_; }
|
||||
Circle &getCollider() { return collider_; }
|
||||
[[nodiscard]] auto getPosX() const -> float { return pos_x_; }
|
||||
[[nodiscard]] auto getPosY() const -> float { return pos_y_; }
|
||||
[[nodiscard]] auto getWidth() const -> int { return width_; }
|
||||
[[nodiscard]] auto getHeight() const -> int { return height_; }
|
||||
[[nodiscard]] auto getType() const -> ItemType { return type_; }
|
||||
[[nodiscard]] auto isEnabled() const -> bool { return enabled_; }
|
||||
[[nodiscard]] auto isOnFloor() const -> bool { return floor_collision_; }
|
||||
auto getCollider() -> Circle & { return collider_; }
|
||||
|
||||
private:
|
||||
private:
|
||||
// Objetos y punteros
|
||||
std::unique_ptr<AnimatedSprite> sprite_; // Sprite con los gráficos del objeto
|
||||
|
||||
@@ -100,5 +100,5 @@ class Item {
|
||||
void updateTimeToLive();
|
||||
|
||||
// Calcula la zona de aparición de la máquina de café
|
||||
int getCoffeeMachineSpawn(int player_x, int item_width, int area_width, int margin = 2);
|
||||
auto getCoffeeMachineSpawn(int player_x, int item_width, int area_width, int margin = 2) -> int;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user