OSDN Git Service

Make LTE_FLOAT a strict weak order.
authorJeff Brown <jeffbrown@google.com>
Fri, 16 Sep 2011 19:00:05 +0000 (12:00 -0700)
committerJeff Brown <jeffbrown@google.com>
Fri, 16 Sep 2011 19:00:05 +0000 (12:00 -0700)
commit13ede62fd77acdf158f7210043fe48644cb4a589
tree8c6a38f65e0969f39773a85303e413ab85dc8f71
parentaab55bf3e323b73062bd932682886b19c062a8a0
Make LTE_FLOAT a strict weak order.
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
libs/hwui/utils/Compare.h