Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use const reference for loop variables.
* addresses the compiler warnings ``` composer/key_parser_test.cc:81:19: warning: loop variable '<structured bindings>' creates a copy from type 'const std::pair<std::basic_string_view<char>, unsigned int>' [-Wrange-loop-construct] 81 | for (const auto [name, modifiers] : kTestData) { | ^~~~~~~~~~~~~~~~~ composer/key_parser_test.cc:81:19: note: use reference type to prevent copying 81 | for (const auto [name, modifiers] : kTestData) { | ^~~~~~~~~~~~~~~~~ | & composer/key_parser_test.cc: In member function 'virtual void mozc::{anonymous}::KeyParserTest_SpecialKeys_Test::TestBody()': composer/key_parser_test.cc:181:19: warning: loop variable '<structured bindings>' creates a copy from type 'const std::pair<std::basic_string_view<char>, mozc::commands::KeyEvent_SpecialKey>' [-Wrange-loop-construct] 181 | for (const auto [name, modifiers] : kTestData) { | ^~~~~~~~~~~~~~~~~ composer/key_parser_test.cc:181:19: note: use reference type to prevent copying 181 | for (const auto [name, modifiers] : kTestData) { | ^~~~~~~~~~~~~~~~~ | & ``` #codehealth PiperOrigin-RevId: 603603821
- Loading branch information