From f9547c89ea9fd0e6d571db840c5cadab079df607 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 27 Sep 2012 14:31:12 +0200 Subject: QPostEventList: change pointer comparison to integer comparison This is exactly the type of pointer arithmetics that GCC likes to miscompile. Just use offset >= size() (=subtract begin() from both sides). Change-Id: Ifb13652d7b96bf4c06727d9c965516e95d16ab5c Reviewed-by: Olivier Goffart --- src/corelib/thread/qthread_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 0667a814c3..268891d5e8 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -114,7 +114,7 @@ public: int priority = ev.priority; if (isEmpty() || last().priority >= priority || - begin() + insertionOffset >= end()) { + insertionOffset >= size()) { // optimization: we can simply append if the last event in // the queue has higher or equal priority append(ev); -- cgit v1.2.3