Expose non-const reference to edges in Graph.hh#580
Merged
caguero merged 3 commits intogazebosim:gz-math7from Mar 22, 2024
Merged
Expose non-const reference to edges in Graph.hh#580caguero merged 3 commits intogazebosim:gz-math7from
caguero merged 3 commits intogazebosim:gz-math7from
Conversation
Signed-off-by: Jagadeeshan S <jagadeeshanmsj@gmail.com>
caguero
reviewed
Feb 29, 2024
Contributor
caguero
left a comment
There was a problem hiding this comment.
I think these changes break ABI (and API). We should retarget the patch to main.
Alternatively, we could add the functions that are missing without changing the existing ones.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## gz-math7 #580 +/- ##
=========================================
Coverage 94.11% 94.11%
=========================================
Files 146 146
Lines 9804 9809 +5
=========================================
+ Hits 9227 9232 +5
Misses 577 577 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jagadeeshan S <jagadeeshanmsj@gmail.com>
Contributor
Author
|
@caguero Thank you for the guiding. |
caguero
approved these changes
Mar 22, 2024
Contributor
caguero
left a comment
There was a problem hiding this comment.
The new function looks good to me.
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.
🦟 Bug fix
Fixes #99
Summary
Issue: The
Graph::VertexFromIdfunction has two versions that return a const and non-const reference to a Vertex. However there is only a const version of theGraph::EdgeFromIdfunction, which makes it hard to modify Edge Data()Solution : Have added non-const(mutable) reference function for
Graph::EdgeFromId.Issue: Likewise, the
Graph::AdjacentsToandGraph::AdjacentsFromfunctions return non-const references to the graph vertices, while theGraph::IncidentsToandGraph::IncidentsFromfunctions only return const references to the graph edges.Solution: Removed the
constfrom return type ofGraph::IncidentsToandGraph::IncidentsFromfunctions.