mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-04-23 21:14:49 +00:00
Stratosphere: Prefer move-construction over copy-construction when moving sink parameters around
This commit is contained in:
parent
5734c54188
commit
1915b8b02e
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue