From 5370670c4ace3d2de85ae71c39a82470e4110319 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Tue, 9 Jan 2024 12:15:20 -0800 Subject: [PATCH 1/2] No need to modify acc for std::accumulate Bug: 175635923 Test: m MODULES-IN-hardware-interfaces-automotive-audiocontrol Change-Id: Ic26706d72966b991424c47c5fb7dd46612a3dcc3 --- automotive/audiocontrol/aidl/default/AudioControl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automotive/audiocontrol/aidl/default/AudioControl.cpp b/automotive/audiocontrol/aidl/default/AudioControl.cpp index cf7307d347..7e7e145d37 100644 --- a/automotive/audiocontrol/aidl/default/AudioControl.cpp +++ b/automotive/audiocontrol/aidl/default/AudioControl.cpp @@ -244,15 +244,15 @@ ndk::ScopedAStatus AudioControl::onDevicesToMuteChange( template static inline std::string toString(const std::vector& in_values) { return std::accumulate(std::begin(in_values), std::end(in_values), std::string{}, - [](std::string& ls, const aidl_type& rs) { - return ls += (ls.empty() ? "" : ",") + rs.toString(); + [](const std::string& ls, const aidl_type& rs) { + return ls + (ls.empty() ? "" : ",") + rs.toString(); }); } template static inline std::string toEnumString(const std::vector& in_values) { return std::accumulate(std::begin(in_values), std::end(in_values), std::string{}, - [](std::string& ls, const aidl_enum_type& rs) { - return ls += (ls.empty() ? "" : ",") + toString(rs); + [](const std::string& ls, const aidl_enum_type& rs) { + return ls + (ls.empty() ? "" : ",") + toString(rs); }); } From 4891ece5c62b98e7268616da4db1de5df43a8098 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Tue, 9 Jan 2024 12:30:51 -0800 Subject: [PATCH 2/2] Add missing libc++ includes Bug: 175635923 Test: m MODULES-IN-hardware-interfaces-wifi Change-Id: Icfaa316bb50b680a2c03c3d818f6ae01860dd334 --- wifi/netlinkinterceptor/aidl/default/InterceptorRelay.h | 1 + 1 file changed, 1 insertion(+) diff --git a/wifi/netlinkinterceptor/aidl/default/InterceptorRelay.h b/wifi/netlinkinterceptor/aidl/default/InterceptorRelay.h index 0178c90e1e..915b5ffbc3 100644 --- a/wifi/netlinkinterceptor/aidl/default/InterceptorRelay.h +++ b/wifi/netlinkinterceptor/aidl/default/InterceptorRelay.h @@ -18,6 +18,7 @@ #include +#include #include #include