forked from rosebudai/OpenRCT2-Web
Use -> syntactic sugar where appropriate (#26162)
This commit is contained in:
1 parent
47006ad220
commit
de3cf7e7a9
7 files changed
+10
-10
No files matched your search
@@ -244,8 +244,8 @@ namespace OpenRCT2::Ui
|
||||
|
||||
for (auto it = outFiltersStorage.begin(); it != outFiltersStorage.end();)
|
||||
{
|
||||
const wchar_t* Name = (*it++).c_str();
|
||||
const wchar_t* Pattern = (*it++).c_str();
|
||||
const wchar_t* Name = (it++)->c_str();
|
||||
const wchar_t* Pattern = (it++)->c_str();
|
||||
result.push_back({ Name, Pattern });
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ BasicTextureInfo TextureCache::GetOrLoadGlyphTexture(const ImageId imageId, cons
|
||||
auto cacheInfo = LoadGlyphTexture(imageId, paletteMap);
|
||||
auto it = _glyphTextureMap.insert(std::make_pair(glyphId, cacheInfo));
|
||||
|
||||
return (*it.first).second;
|
||||
return it.first->second;
|
||||
}
|
||||
|
||||
BasicTextureInfo TextureCache::GetOrLoadBitmapTexture(ImageIndex image, const void* pixels, size_t width, size_t height)
|
||||
|
||||
@@ -1212,7 +1212,7 @@ void Staff::UpdateSweeping()
|
||||
}
|
||||
if (auto loc = UpdateAction(); loc.has_value())
|
||||
{
|
||||
int16_t actionZ = GetZOnSlope((*loc).x, (*loc).y);
|
||||
int16_t actionZ = GetZOnSlope(loc->x, loc->y);
|
||||
MoveTo({ loc.value(), actionZ });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ static constexpr float kWindowScrollLocations[][2] = {
|
||||
if ((*it)->flags.has(WindowFlag::dead))
|
||||
continue;
|
||||
|
||||
auto w2 = (*it).get();
|
||||
auto w2 = it->get();
|
||||
auto x1 = w2->windowPos.x - 10;
|
||||
auto y1 = w2->windowPos.y - 10;
|
||||
if (x2 >= x1 && x2 <= w2->width + x1 + 20)
|
||||
@@ -560,7 +560,7 @@ static constexpr float kWindowScrollLocations[][2] = {
|
||||
// Draw the window and any other overlapping transparent windows
|
||||
for (auto it = WindowGetIterator(&w); it != gWindowList.end(); it++)
|
||||
{
|
||||
auto* v = (*it).get();
|
||||
auto* v = it->get();
|
||||
if (v->flags.has(WindowFlag::dead))
|
||||
continue;
|
||||
if ((&w == v || v->flags.has(WindowFlag::transparent)) && v->isVisible)
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace OpenRCT2::Network
|
||||
auto entry = ServerListEntry::FromJson(jinfo);
|
||||
if (entry.has_value())
|
||||
{
|
||||
(*entry).Local = true;
|
||||
entry->Local = true;
|
||||
entries.push_back(std::move(*entry));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3061,10 +3061,10 @@ static void RideSetMazeEntranceExitPoints(Ride& ride)
|
||||
*position++ = station.Exit;
|
||||
}
|
||||
}
|
||||
(*position++).SetNull();
|
||||
position->SetNull();
|
||||
|
||||
// Enumerate entrance and exit positions
|
||||
for (position = positions; !(*position).IsNull(); position++)
|
||||
for (position = positions; !position->IsNull(); position++)
|
||||
{
|
||||
auto entranceExitMapPos = position->ToCoordsXYZ();
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ void Vehicle::UpdateTrackChange()
|
||||
return;
|
||||
|
||||
_vehicleCurPosition = TrackLocation
|
||||
+ CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor((*curRide).type).Heights.VehicleZOffset };
|
||||
+ CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor(curRide->type).Heights.VehicleZOffset };
|
||||
Orientation = moveInfo->yaw;
|
||||
roll = moveInfo->roll;
|
||||
pitch = moveInfo->pitch;
|
||||
|
||||
Reference in new issue
Block a user