Stratosphere: Prefer move-construction over copy-construction when moving sink parameters around

This commit is contained in:
Tony Wasserka 2018-06-16 19:52:34 +02:00
parent 5734c54188
commit 1915b8b02e

View file

@ -33,14 +33,14 @@ class DomainOwner {
}
*out_i = std::distance(domain_objects.begin(), object_it);
*object_it = object;
*object_it = std::move(object);
(*object_it)->set_owner(this);
return 0;
}
Result set_object(std::shared_ptr<IServiceObject> object, unsigned int i) {
if (domain_objects[i] == NULL) {
domain_objects[i] = object;
domain_objects[i] = std::move(object);
object->set_owner(this);
return 0;
}