mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 21:37:44 +00:00
Merge "Fix strict weak ordering requirement of less than operation" am: e82263dd74
am: 36b364abfb
Change-Id: I7a97aaecd25f3a78a3f9508388a88ace9c97642e
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user