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:
@@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user