]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
options: use move instead of copy in build_options() 18003/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 27 Sep 2017 20:14:29 +0000 (16:14 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 27 Sep 2017 20:21:55 +0000 (16:21 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/options.cc

index 7de4ee241cc919b0568d625e9b88ddf8ed6ef83e..7ee706fc1fbe5daa71ddf1669bb8a682e08a9f92 100644 (file)
@@ -6049,10 +6049,9 @@ static std::vector<Option> build_options()
   std::vector<Option> result = get_global_options();
 
   auto ingest = [&result](std::vector<Option>&& options, const char* svc) {
-    for (const auto &o_in : options) {
-      Option o(o_in);
+    for (auto &o : options) {
       o.add_service(svc);
-      result.push_back(o);
+      result.push_back(std::move(o));
     }
   };