From 1915b8b02e14192cd0c7ca02b69a1f6a34772de9 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sat, 16 Jun 2018 19:52:34 +0200 Subject: [PATCH] Stratosphere: Prefer move-construction over copy-construction when moving sink parameters around --- .../libstratosphere/include/stratosphere/domainowner.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stratosphere/libstratosphere/include/stratosphere/domainowner.hpp b/stratosphere/libstratosphere/include/stratosphere/domainowner.hpp index d20fe5efc..adb64b9c3 100644 --- a/stratosphere/libstratosphere/include/stratosphere/domainowner.hpp +++ b/stratosphere/libstratosphere/include/stratosphere/domainowner.hpp @@ -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 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; }