Skip to content

Commit

Permalink
Clang/str_list.h: fix clang warning about std::move
Browse files Browse the repository at this point in the history
/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 <[email protected]>
  • Loading branch information
wjwithagen authored Dec 19, 2016
1 parent 2d982ae commit d9acbf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/str_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d9acbf5

Please sign in to comment.