Commit 784fa6e4 authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

Make CreateTimeCompare to be a strict comparison.

[Android sheriff]
std::sort requires a sorter which satisfies the strict weak ordering.
Otherwise some tests in debug mode crash this way:
~~~
[ RUN      ] ScheduledNotificationManagerTest.DeleteNotifications
algorithm:814: _LIBCPP_ASSERT '!__comp_(__l, __r)' failed. Comparator
does not induce a strict weak ordering
[ CRASHED      ]
~~~

TBR=dtrainor@chromium.org,xingliu@chromium.org

Bug: 1075541
Change-Id: Ic160e2c6201e6bd8702f71658613ab3eb7425a90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2166111Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762841}
parent bf32ea6e
......@@ -34,7 +34,7 @@ namespace {
bool CreateTimeCompare(const NotificationEntry* lhs,
const NotificationEntry* rhs) {
DCHECK(lhs && rhs);
return lhs->create_time <= rhs->create_time;
return lhs->create_time < rhs->create_time;
}
// Vailidates notification entry. Returns false if the entry should be deleted.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment