Skip to content

Fix const warning range for loop#129

Open
jmackay2 wants to merge 1 commit intoanqixu:foxyfrom
jmackay2:fix_const_warning
Open

Fix const warning range for loop#129
jmackay2 wants to merge 1 commit intoanqixu:foxyfrom
jmackay2:fix_const_warning

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