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

@ -9,7 +9,7 @@ namespace lighting {
for(matrix::box it{$lightmap, at.x, at.y, (size_t)floor(source.radius)}; it.next();) {
if($paths.$paths[it.y][it.x] != WALL_PATH_LIMIT) {
$lightmap[it.y][it.x] = light_level(source.strength, it.distance(), it.x, it.y);
has_light.push_back({it.x, it.y});
has_light.emplace_back(it.x, it.y);
}
}
}