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

Commit 22368369 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

Change-Id: I7a97aaecd25f3a78a3f9508388a88ace9c97642e
parents e0768654 36b364ab
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>