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

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

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);

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)
{