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

Commit f6f522c5 authored by Janis Danisevskis's avatar Janis Danisevskis Committed by android-build-merger
Browse files

Merge "Fix strict weak ordering requirement of less than operation" am: e82263dd am: 36b364ab

am: 22368369

Change-Id: I2301e7fec1c5c28516dafff483a8a0f2a2e00b0a
parents d1be2d36 22368369
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -21,7 +21,9 @@ namespace android {
namespace hardware {

inline static bool operator<(const hidl_vec<uint8_t>& a, const hidl_vec<uint8_t>& b) {
    return memcmp(a.data(), b.data(), std::min(a.size(), b.size())) == -1;
    auto result = memcmp(a.data(), b.data(), std::min(a.size(), b.size()));
    if (!result) return a.size() < b.size();
    return result < 0;
}

template <size_t SIZE>