Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 668fed79 authored by Yifan Hong's avatar Yifan Hong
Browse files

Renamed toString to vecToString

to avoid clashing of names for the added
::android::hardware::details::toString()
for hidl_vec.

Test: mma

Bug: 33459772
Change-Id: I6fbcaf9b30e29784b8915f7668cd1456de910eea
parent 060d5fb8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ inline std::string enumToHexString(T value) {
}

template <typename T>
inline std::string toString(const hidl_vec<T>& vec) {
inline std::string vecToString(const hidl_vec<T>& vec) {
    std::stringstream ss("[");
    for (size_t i = 0; i < vec.size(); i++) {
        if (i != 0) ss << ",";
@@ -222,10 +222,10 @@ inline std::string toString(const VehiclePropValue &v) {
       << "  areaId: " << hexString(v.areaId) << ",\n"
       << "  timestamp: " << v.timestamp << ",\n"
       << "  value {\n"
       << "    int32Values: " << toString(v.value.int32Values) << ",\n"
       << "    floatValues: " << toString(v.value.floatValues) << ",\n"
       << "    int64Values: " << toString(v.value.int64Values) << ",\n"
       << "    bytes: " << toString(v.value.bytes) << ",\n"
       << "    int32Values: " << vecToString(v.value.int32Values) << ",\n"
       << "    floatValues: " << vecToString(v.value.floatValues) << ",\n"
       << "    int64Values: " << vecToString(v.value.int64Values) << ",\n"
       << "    bytes: " << vecToString(v.value.bytes) << ",\n"
       << "    string: " << v.value.stringValue.c_str() << ",\n"
       << "  }\n"
       << "}\n";