Repository navigation
Update getTimestamp and getFramId to not return const references - #14
Merged
Merged
Conversation
Windows VC++ was complaining that we were returning a pointer to a temporary. To avoid this, don't return a pointer, and just construct and return an object, which C++11 should be able to elide the copy for (see http://stackoverflow.com/questions/14856344/when-should-stdmove-be-used-on-a-function-return-value Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
This was referenced Apr 19, 2017
clalancette
approved these changes
Apr 24, 2017
clalancette
left a comment
Contributor
There was a problem hiding this comment.
This looks good to me, and should fix the issues we are having.
Contributor
|
Actually, while the changes look good to me, it would be best to get some CI on it. |
Member
Author
srmainwaring
pushed a commit
to srmainwaring/geometry2
that referenced
this pull request
Sep 18, 2023
If the variables happen to have semicolons in them, then an unquoted version means that we get CMake errors about set_target_properties having the wrong number of arguments. Make sure to quote all of the variables. (cherry picked from commit 08bff5916ffd2331afa1511b66a8ce48125c2a10) Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Chris Lalancette <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connects to ros2/navigation#5
getTimestampandgetFrameIdare safe (enough) to returnconst ros::Time&in ROS 1.For ROS 2, we need to convert from
builtin_interfaces::msg::Timetotf2::TimePoint, which involves more than just passing the timestamp through.For that reason, this PR changes the signature of
getTimestampto not return const references. For good measure, I did the same forgetFrameIdbecause you never know what might need to happen underneath.