Fix -Wrange-loop-construct warning
Fixing these warnings either by adding a reference to the loop index's
type or removing the reference from it.
frameworks/native/libs/binder/ndk/tests/libbinder_ndk_unit_test.cpp:260:21:
error: loop variable 'service' creates a copy from type
'android::String16 const' [-Werror,-Wrange-loop-construct]
260 | for (const auto service : services) {
| ^
frameworks/native/libs/binder/ndk/tests/libbinder_ndk_unit_test.cpp:260:10:
note: use reference type 'android::String16 const &' to prevent copying
260 | for (const auto service : services) {
| ^~~~~~~~~~~~~~~~~~~~
| &
Bug: 153747076
Test: m & presubmits
Flag: EXEMPT refactor
Change-Id: I0efa171c1685b883b31116626c7579b4f91e802a
Loading
Please register or sign in to comment