replace push_back with emplace_back
This commit is contained in:
parent
3197f334d1
commit
510e12a921
1 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ std::vector<GridPosition> Board::initialPelletPositions() {
|
||||||
for (std::size_t row = 0; row < ROWS; row++) {
|
for (std::size_t row = 0; row < ROWS; row++) {
|
||||||
for (std::size_t column = 0; column < COLUMNS; column++) {
|
for (std::size_t column = 0; column < COLUMNS; column++) {
|
||||||
if (board[row][column] == int(Cell::pellet))
|
if (board[row][column] == int(Cell::pellet))
|
||||||
positions.push_back({ int(column), int(row) });
|
positions.emplace_back(column, row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return positions;
|
return positions;
|
||||||
|
@ -84,7 +84,7 @@ std::vector<GridPosition> Board::initialSuperPelletPositions() {
|
||||||
for (std::size_t row = 0; row < ROWS; row++) {
|
for (std::size_t row = 0; row < ROWS; row++) {
|
||||||
for (std::size_t column = 0; column < COLUMNS; column++) {
|
for (std::size_t column = 0; column < COLUMNS; column++) {
|
||||||
if (board[row][column] == int(Cell::power_pellet))
|
if (board[row][column] == int(Cell::power_pellet))
|
||||||
positions.push_back({ int(column), int(row) });
|
positions.emplace_back(column, row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return positions;
|
return positions;
|
||||||
|
|
Loading…
Reference in a new issue