mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 05:49:27 +00:00
No need to modify acc for std::accumulate
Bug: 175635923 Test: m MODULES-IN-hardware-interfaces-automotive-audiocontrol Change-Id: Ic26706d72966b991424c47c5fb7dd46612a3dcc3
This commit is contained in:
@@ -244,15 +244,15 @@ ndk::ScopedAStatus AudioControl::onDevicesToMuteChange(
|
||||
template <typename aidl_type>
|
||||
static inline std::string toString(const std::vector<aidl_type>& 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 <typename aidl_enum_type>
|
||||
static inline std::string toEnumString(const std::vector<aidl_enum_type>& 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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user