diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-10-16 21:20:57 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-10-16 22:03:07 +0200 |
commit | d4269c5373cf8ccc0a5631b9d0900227e11e13f1 (patch) | |
tree | 46ba21dd28d7562fdf0a256c0f0c718f1ee0d814 /sd | |
parent | a69f48d923628facf7113ebc739a8273c4069122 (diff) |
sd: BestFittingCacheComparer must be irreflexive
/usr/include/c++/7/bits/stl_algo.h:4866:
Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)).
... when using "Window->New Window" in Impress.
Change-Id: I885a59cf378b7020d549580c2fc1cf121c6a59bd
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx index b5626c8ccba6..a7affa3b1814 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx @@ -89,10 +89,10 @@ public: bool operator()(const ::sd::slidesorter::cache::PageCacheManager::BestFittingPageCaches::value_type& rElement1, const ::sd::slidesorter::cache::PageCacheManager::BestFittingPageCaches::value_type& rElement2) { - if (rElement1.first == maPreferredSize) - return true; - else if (rElement2.first == maPreferredSize) + if (rElement2.first == maPreferredSize) return false; + else if (rElement1.first == maPreferredSize) + return true; else return (rElement1.first.Width()*rElement1.first.Height() > rElement2.first.Width()*rElement2.first.Height()); |