]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Clang/str_list.h: fix clang warning about std::move 12570/head
authorWillem Jan Withagen <wjw@digiware.nl>
Mon, 19 Dec 2016 16:29:38 +0000 (17:29 +0100)
committerGitHub <noreply@github.com>
Mon, 19 Dec 2016 16:29:38 +0000 (17:29 +0100)
/home/jenkins/workspace/ceph-master/src/include/str_list.h:99:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
  return std::move(str_vec);
         ^
/home/jenkins/workspace/ceph-master/src/include/str_list.h:99:10: note: remove std::move call here
  return std::move(str_vec);
         ^~~~~~~~~~       ~
1 warning generated.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/include/str_list.h

index 12cf1280854e7b061091136b1911fd4a50c66eda..7f4dce535368d1ff5fb1819e1e0c97a5037dc8e7 100644 (file)
@@ -96,7 +96,7 @@ static inline std::vector<std::string> get_str_vec(const std::string& str)
   std::vector<std::string> str_vec;
   const char *delims = ";,= \t";
   get_str_vec(str, delims, str_vec);
-  return std::move(str_vec);
+  return str_vec;
 }
 
 #endif