1
0
Fork 0

Codefix: Missing 'this->' in VehiclesNearTileXY::Iterator::Iterator (#14288)

pull/14270/head
SamuXarick 2025-05-21 19:28:47 +01:00 committed by GitHub
parent 1d8db2223f
commit 8f3f25de4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 8 deletions

View File

@ -432,17 +432,17 @@ static std::array<Vehicle *, TOTAL_TILE_HASH_SIZE> _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<int>(0, x - max_dist);
pos_rect.right = std::max<int>(0, x + max_dist);
pos_rect.top = std::max<int>(0, y - max_dist);
pos_rect.bottom = std::max<int>(0, y + max_dist);
this->pos_rect.left = std::max<int>(0, x - max_dist);
this->pos_rect.right = std::max<int>(0, x + max_dist);
this->pos_rect.top = std::max<int>(0, y - max_dist);
this->pos_rect.bottom = std::max<int>(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;