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

Commit 36b364ab 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

Change-Id: I56d837bd4429d13fd9a77ce43b0cafecfc243ee5
parents 0e8d2cb6 e82263dd
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>