diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-01-19 10:41:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-01-19 10:41:08 +0100 |
commit | 72865662208e1c053c8a48b4751e234cf3a312da (patch) | |
tree | d834a85c377930af40b66b42b3a2014e44551147 /sdext | |
parent | 21f98618d8cd7562d423e94db988126d662165c9 (diff) |
Ensure irreflexivity of std::stable_sort predicate
GCC 6 libstdc++ checks for that in debug mode now
Change-Id: I879b1b5eb9b54ad19749e561c55333b0a084c699
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/tree/pdfiprocessor.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 7b1cd7413de8..567f25654944 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -635,6 +635,10 @@ void PDFIProcessor::endIndicator() static bool lr_tb_sort( Element* pLeft, Element* pRight ) { + // Ensure irreflexivity (which could be compromised if h or w is negative): + if (pLeft == pRight) + return false; + // first: top-bottom sorting // Note: allow for 10% overlap on text lines since text lines are usually |