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

Commit 3fccb86b authored by Jeff Brown's avatar Jeff Brown
Browse files

Make LTE_FLOAT a strict weak order. (DO NOT MERGE)

Bug: 5327776

Currently LTE_FLOAT isn't even a valid partial order, let alone
a strict weak order as needed by binary search.  Consequently,
KeyedVectors with keys whose types have operator< using LTE_FLOAT
sometimes find the wrong values!

This problem affects several graphics caches including the
TextLayoutCache.

(This is still not a total order because NaNs are not comparable
but hopefully we don't ever search for NaNs this way!)

Change-Id: Ic447a34c7d87f681ee81538f22a0937a039072dd
parent 3d5759b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
 */
#define LTE_FLOAT(a) \
    if (a < rhs.a) return true; \
    if (ALMOST_EQUAL(a, rhs.a))
    if (a == rhs.a)

/**
 * Compare integers.