Skip to content
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

Overload FailedDisplay::save for proper override #1402

Merged
merged 3 commits into from
Aug 27, 2019

Conversation

artivis
Copy link
Contributor

@artivis artivis commented Aug 19, 2019

Description

Overload FailedDisplay::save for properly overriding Display::save without breaking ABI.

Fix #1390

  Avoid ABI braking
  Fix ros-visualization#1390

Signed-off-by: artivis <jeremie.deray@canonical.com>
Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this issue. We should really switch to the new override syntax to detect those issues.
See my inline comment.

@@ -70,6 +70,11 @@ void FailedDisplay::load( const Config& config )
}

void FailedDisplay::save( Config config )
{
save(config);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this use a const_cast for this to actually redirect to the const-version and avoid an infinite loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhaschke Thanks for pointing this out, fixed.

@rhaschke rhaschke merged commit 9046075 into ros-visualization:melodic-devel Aug 27, 2019
@rhaschke rhaschke mentioned this pull request Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coverity report bad_override
2 participants