1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-11 01:52:32 +01:00

Merge pull request #25278 from ZehMatt/use-after-move

RideList.cpp: Don't use the variable after it is moved
This commit is contained in:
Matt
2025-09-28 22:13:54 +03:00
committed by GitHub

View File

@@ -968,10 +968,12 @@ namespace OpenRCT2::Ui::Windows
rideRef.windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_LIST; rideRef.windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_LIST;
} }
const auto filterApplies = IsFiltered(rideName);
RideListEntry entry{ RideListEntry entry{
.Id = rideRef.id, .Id = rideRef.id,
.Name = std::move(rideName), .Name = std::move(rideName),
.Visible = IsFiltered(rideName), .Visible = filterApplies,
}; };
_rideList.push_back(std::move(entry)); _rideList.push_back(std::move(entry));