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

Image: make several methods const #310

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

scpeters
Copy link
Member

🦟 Bug fix

Split out from #292

Summary

The Image::Data, Image::RGBData, and Image::AvgColor methods do not modify any object data but are not marked as const, which prevents other const methods from calling them. This changes API, so it must be done on the main branch.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

The Data, RGBData, and AvgColor methods do not modify
any object data but are not marked as const, which
prevents other const methods from calling them. This
change API, so it must be done on the main branch.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters requested a review from jennuine February 10, 2022 19:39
@scpeters scpeters requested a review from mjcarroll as a code owner February 10, 2022 19:39
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Feb 10, 2022
@codecov
Copy link

codecov bot commented Feb 10, 2022

Codecov Report

Merging #310 (13f1487) into main (47e6a3a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #310   +/-   ##
=======================================
  Coverage   76.74%   76.74%           
=======================================
  Files          75       75           
  Lines       10323    10323           
=======================================
  Hits         7922     7922           
  Misses       2401     2401           
Impacted Files Coverage Δ
graphics/include/ignition/common/Image.hh 97.05% <ø> (ø)
graphics/src/Image.cc 69.14% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47e6a3a...13f1487. Read the comment docs.

Copy link
Contributor

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

LGTM, ran all ign tests in local garden workspace and they passed except for a few flaky tests.

@mjcarroll mjcarroll merged commit 4256a57 into gazebosim:main Feb 10, 2022
@scpeters scpeters deleted the image_const_methods branch February 10, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants