From 8f3f25de4b217d09d9f7915708fa0c8ef51c3784 Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Wed, 21 May 2025 19:28:47 +0100 Subject: [PATCH] Codefix: Missing 'this->' in VehiclesNearTileXY::Iterator::Iterator (#14288) --- src/vehicle.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 9f56c4d659..99fc6bedf7 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -432,17 +432,17 @@ static std::array _vehicle_tile_hash{}; VehiclesNearTileXY::Iterator::Iterator(int32_t x, int32_t y, uint max_dist) { /* There are no negative tile coordinates */ - pos_rect.left = std::max(0, x - max_dist); - pos_rect.right = std::max(0, x + max_dist); - pos_rect.top = std::max(0, y - max_dist); - pos_rect.bottom = std::max(0, y + max_dist); + this->pos_rect.left = std::max(0, x - max_dist); + this->pos_rect.right = std::max(0, x + max_dist); + this->pos_rect.top = std::max(0, y - max_dist); + this->pos_rect.bottom = std::max(0, y + max_dist); if (2 * max_dist < TILE_HASH_MASK * TILE_SIZE) { /* Hash area to scan */ - this->hxmin = this->hx = GetTileHash1D(pos_rect.left / TILE_SIZE); - this->hxmax = GetTileHash1D(pos_rect.right / TILE_SIZE); - this->hymin = this->hy = GetTileHash1D(pos_rect.top / TILE_SIZE); - this->hymax = GetTileHash1D(pos_rect.bottom / TILE_SIZE); + this->hxmin = this->hx = GetTileHash1D(this->pos_rect.left / TILE_SIZE); + this->hxmax = GetTileHash1D(this->pos_rect.right / TILE_SIZE); + this->hymin = this->hy = GetTileHash1D(this->pos_rect.top / TILE_SIZE); + this->hymax = GetTileHash1D(this->pos_rect.bottom / TILE_SIZE); } else { /* Scan all */ this->hxmin = this->hx = 0;