mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make ParkLoadResult move friendly (#11297)
This patch changes the member of ParkLoadResult to not be const. Const members cannot be moved so trying to move ParkLoadResult actually causes a copy. It also adds std::move to move the parameter to the member, otherwise a copy happens. See: https://godbolt.org/z/L4Wakb
This commit is contained in:
parent
a80905e30d
commit
10ab9e4528
|
@ -35,10 +35,10 @@ struct scenario_index_entry;
|
|||
struct ParkLoadResult final
|
||||
{
|
||||
public:
|
||||
std::vector<rct_object_entry> const RequiredObjects;
|
||||
std::vector<rct_object_entry> RequiredObjects;
|
||||
|
||||
explicit ParkLoadResult(std::vector<rct_object_entry>&& requiredObjects)
|
||||
: RequiredObjects(requiredObjects)
|
||||
: RequiredObjects(std::move(requiredObjects))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue