From 510e12a9214f434bd1a735943a1e8a3aee6e0131 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 6 Jul 2021 10:07:35 +0200 Subject: [PATCH] replace push_back with emplace_back --- lib/Board.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Board.cpp b/lib/Board.cpp index f550bf6..8dfa09a 100644 --- a/lib/Board.cpp +++ b/lib/Board.cpp @@ -73,7 +73,7 @@ std::vector Board::initialPelletPositions() { for (std::size_t row = 0; row < ROWS; row++) { for (std::size_t column = 0; column < COLUMNS; column++) { if (board[row][column] == int(Cell::pellet)) - positions.push_back({ int(column), int(row) }); + positions.emplace_back(column, row); } } return positions; @@ -84,7 +84,7 @@ std::vector Board::initialSuperPelletPositions() { for (std::size_t row = 0; row < ROWS; row++) { for (std::size_t column = 0; column < COLUMNS; column++) { if (board[row][column] == int(Cell::power_pellet)) - positions.push_back({ int(column), int(row) }); + positions.emplace_back(column, row); } } return positions;