Skip to content

Commit 38e9862

Browse files
committed
Fix type casting long to int
1 parent 6bf6962 commit 38e9862

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/enemy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <enemy.hpp>
22
#include <algorithm>
3-
#include <utility>
43
#include "enemy_params.hpp"
54
#include "glm/geometric.hpp"
65
#include "glm/vec2.hpp"

src/game.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void Game::tick([[maybe_unused]] kvf::Seconds const dt) {
4242
}
4343
// Keep track of how many enemies were defeated and calculate score
4444
auto res = std::erase_if(m_enemies, [](Enemy const& enemy) { return !enemy.get_health(); });
45-
update_score(res * 10);
45+
update_score(static_cast<int>(res * 10));
4646
m_light.set_position(m_cursor_pos);
4747
m_lighthouse.rotate_towards_cursor(m_cursor_pos);
4848
}

0 commit comments

Comments
 (0)