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

Fix const warning range for loop #129

Open
wants to merge 1 commit into
base: foxy
Choose a base branch
from

Conversation

jmackay2
Copy link
Collaborator

This fixes the following warning to prevent copying:

error: loop variable 'value' of type 'const std::pair<std::__cxx11::basic_string<char>, int>&' binds to a temporary constructed from type 'const std::pair<const std::__cxx11::basic_string<char>, int>' [-Werror=range-loop-construct] 1873 | for (const std::pair<std::string, INT>& value: COLOR_DICTIONARY) {

@jmackay2
Copy link
Collaborator Author

Fixes #130

@jmackay2 jmackay2 requested a review from nullket March 29, 2023 03:08
@nullket
Copy link
Collaborator

nullket commented Mar 29, 2023

Looks good to me but I am still on noetic so I cannot test it.

@SammyRamone
Copy link

It removed this error for me. Thanks @jmackay2
I had to do more changes to get it to work, but I think that this was due to the XS camera that I am using. You can see my fork of this fork here https://github.com/SammyRamone/ueye_cam/tree/xs_cam

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.

3 participants