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:
parent
18a5f6bfa9
commit
3344181a47
6 changed files with 18 additions and 23 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue