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 a warning shown up with clang++: -Wall -Werror -Wextra #130

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

cjatin
Copy link
Contributor

@cjatin cjatin commented Jan 9, 2024

elfio/elfio_modinfo.hpp:62:26: warning: loop variable '[first, second]' creates a copy from type 'std::pair<std::basic_string<char>, std::basic_string<char>> const' [-Wrange-loop-construct]
   62 |         for ( const auto [first, second] : content ) {
      |                          ^
elfio/elfio_modinfo.hpp:62:15: note: use reference type 'std::pair<std::basic_string<char>, std::basic_string<char>> const &' to prevent copying
   62 |         for ( const auto [first, second] : content ) {
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                          &
1 warning generated.

@serge1
Copy link
Owner

serge1 commented Jan 12, 2024

Accepted. Thank you!

@serge1 serge1 merged commit 9814eaa into serge1:main Jan 12, 2024
20 checks passed
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.

2 participants