Prevent making unnecessary copies in certain tile loops (#9549)

This commit is contained in:
Aaron van Geffen authored and Michael Steenbeek committed 2019-07-11 18:43:33 +02:00
1 parent 57347d5710
commit cfd863ef12
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -208,7 +208,7 @@ void font_sprite_initialise_characters()
{
// Compute min and max that helps avoiding lookups for no reason.
_smallestCodepointValue = std::numeric_limits<char32_t>::max();
for (const auto entry : codepointOffsetMap)
for (const auto& entry : codepointOffsetMap)
{
_smallestCodepointValue = std::min(_smallestCodepointValue, entry.first);
_biggestCodepointValue = std::max(_biggestCodepointValue, entry.first);
+1 -1
View File
@@ -680,7 +680,7 @@ void track_design_mirror(rct_track_td6* td6)
static void track_design_add_selection_tile(int16_t x, int16_t y)
{
for (const auto tile : gMapSelectionTiles)
for (const auto& tile : gMapSelectionTiles)
{
if (tile.x == x && tile.y == y)
{