mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-04 08:32:15 +02:00
Stratosphere: Prefer move-construction over copy-construction when moving sink parameters around
This commit is contained in:
parent
5734c54188
commit
1915b8b02e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user