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 <ogoffart@woboq.com>
This commit is contained in:
parent
b0a7974c6a
commit
f9547c89ea
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user