diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-09-16 12:00:05 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-09-16 13:35:01 -0700 |
commit | 3fccb86b31b4065d6ebd2e0268bee710123f0a24 (patch) | |
tree | d06898908b1cd8a7e2a90c00155d5fcf5909f228 /libs | |
parent | 3d5759b527fd0e48cfcc759dfed68fbe5a4dd050 (diff) | |
download | frameworks_base-3fccb86b31b4065d6ebd2e0268bee710123f0a24.zip frameworks_base-3fccb86b31b4065d6ebd2e0268bee710123f0a24.tar.gz frameworks_base-3fccb86b31b4065d6ebd2e0268bee710123f0a24.tar.bz2 |
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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/utils/Compare.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/utils/Compare.h b/libs/hwui/utils/Compare.h index 6531e78..f079a7b 100644 --- a/libs/hwui/utils/Compare.h +++ b/libs/hwui/utils/Compare.h @@ -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. |