Cleaned up all the places I was doing push_back({constructorvar1, constructorvar2}) to use emplace_back(constructorvar1, constructorvar2) every other use should be only for actually copying.

This commit is contained in:
Zed A. Shaw 2025-01-22 07:38:49 -05:00
parent 18a5f6bfa9
commit 3344181a47
6 changed files with 18 additions and 23 deletions

View file

@ -286,7 +286,7 @@ inline bool random_path(Map &map, PointList &holes, Point src, Point target) {
inline void straight_path(Map &map, PointList &holes, Point src, Point target) {
for(matrix::line dig{src, target}; dig.next();) {
holes.push_back({size_t(dig.x), size_t(dig.y)});
holes.emplace_back(size_t(dig.x), size_t(dig.y));
Point expand{(size_t)dig.x+1, (size_t)dig.y};
if(map.inmap(expand.x, expand.y)) {