mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 10:05:19 +00:00
Merge "Fix strict weak ordering requirement of less than operation"
am: e82263dd74
Change-Id: I56d837bd4429d13fd9a77ce43b0cafecfc243ee5
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