-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build with latest sdformat11 branch #607
Conversation
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## main #607 +/- ##
==========================================
- Coverage 77.38% 77.34% -0.04%
==========================================
Files 213 213
Lines 11950 11967 +17
==========================================
+ Hits 9247 9256 +9
- Misses 2703 2711 +8
Continue to review full report at Codecov.
|
Signed-off-by: Louise Poubel <louise@openrobotics.org>
auto light = root.Light(); | ||
light->SetName(desiredName); | ||
entity = this->iface->creator->CreateEntities(light); | ||
auto light = *root.Light(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to tell, does this cause a copy where there wasn't one before, or is root.Light()
returning a reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the idea is to make a copy, because Root::Light()
returns a const pointer. I think this is only a problem on Windows. As far as I can tell, that has been returning a const pointer since it was implemented and didn't cause issues on Linux or macOS. That line was introduced in #572, before we enabled Windows CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
The const-correctness introduced in gazebosim/sdformat#474 broke
ign-gazebo
. I originally thought this was a Windows-only issue, but it turns out it manifested first on Windows because CI builds SDFormat from source.