mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:07:40 +00:00
AK: Make Vector use size_t for its size and capacity
This commit is contained in:
parent
9c6f7d3e7d
commit
ceec1a7d38
94 changed files with 323 additions and 317 deletions
|
@ -66,7 +66,7 @@ void SnakeGame::reset()
|
|||
|
||||
bool SnakeGame::is_available(const Coordinate& coord)
|
||||
{
|
||||
for (int i = 0; i < m_tail.size(); ++i) {
|
||||
for (size_t i = 0; i < m_tail.size(); ++i) {
|
||||
if (m_tail[i] == coord)
|
||||
return false;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ void SnakeGame::timer_event(Core::TimerEvent&)
|
|||
|
||||
dirty_cells.append(m_head);
|
||||
|
||||
for (int i = 0; i < m_tail.size(); ++i) {
|
||||
for (size_t i = 0; i < m_tail.size(); ++i) {
|
||||
if (m_head == m_tail[i]) {
|
||||
game_over();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue