Skip to content

Commit

Permalink
Fix warning by removing redundant std::move()
Browse files Browse the repository at this point in the history
In ``convert_keypoints_to_json()`` the variable ``json_keypoints`` is returned with an unnecessary enclosing ``std::move()`` (it will already be moved by RVO), giving a gcc warning. Fix it.
  • Loading branch information
alexdewar committed Jan 27, 2021
1 parent 9eb280a commit 1c8e7e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openvslam/data/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ nlohmann::json convert_keypoints_to_json(const std::vector<cv::KeyPoint>& keypts
{"ang", keypts.at(idx).angle},
{"oct", static_cast<unsigned int>(keypts.at(idx).octave)}};
}
return std::move(json_keypts);
return json_keypts;
}

std::vector<cv::KeyPoint> convert_json_to_keypoints(const nlohmann::json& json_keypts) {
Expand Down

0 comments on commit 1c8e7e3

Please sign in to comment.