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:
Breno Rodrigues Guimarães authored and GitHub committed 2020-04-16 13:13:13 +02:00
1 parent a80905e30d
commit 10ab9e4528
1 file changed
+2 -2
+2 -2
View File
@@ -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))
{
}
};