clang-tidy
This commit is contained in:
@@ -223,7 +223,7 @@ void Player::moveHorizontal(float delta_time) {
|
||||
}
|
||||
|
||||
const auto& tc = room_->getTileCollider();
|
||||
float new_x = x_ + vx_ * delta_time;
|
||||
float new_x = x_ + (vx_ * delta_time);
|
||||
|
||||
// Colisión con paredes
|
||||
if (vx_ < 0.0F) {
|
||||
@@ -431,9 +431,9 @@ void Player::transitionToState(State state) {
|
||||
// Bordes de pantalla
|
||||
// ============================================================================
|
||||
|
||||
auto Player::handleBorders() -> Room::Border {
|
||||
const float CENTER_X = x_ + WIDTH / 2.0F;
|
||||
const float CENTER_Y = y_ + HEIGHT / 2.0F;
|
||||
auto Player::handleBorders() const -> Room::Border {
|
||||
const float CENTER_X = x_ + (WIDTH / 2.0F);
|
||||
const float CENTER_Y = y_ + (HEIGHT / 2.0F);
|
||||
|
||||
if (CENTER_X < PlayArea::LEFT) { return Room::Border::LEFT; }
|
||||
if (CENTER_X > PlayArea::RIGHT) { return Room::Border::RIGHT; }
|
||||
|
||||
@@ -143,7 +143,7 @@ class Player {
|
||||
void syncSpriteAndCollider();
|
||||
void placeSprite();
|
||||
void animate(float delta_time);
|
||||
auto handleBorders() -> Room::Border;
|
||||
auto handleBorders() const -> Room::Border;
|
||||
|
||||
// --- Inicialización ---
|
||||
void initSprite(const std::string& animations_path);
|
||||
|
||||
Reference in New Issue
Block a user