From f9baa22f0d6f7dddee63426e4045931e90f0eb5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 29 Jun 2016 11:03:43 +0200 Subject: [PATCH] Fix unsigned-signed comparison with touch id in input.cpp The id we internally have is a signed int and might be negative, but the touch id we get is unsigned. We can savely cast the unsigned to signed as touch ids are recycled and more than 10 touch points is unlikely to be useful. --- input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input.cpp b/input.cpp index f7d3a05fff..3d88d93c76 100644 --- a/input.cpp +++ b/input.cpp @@ -602,7 +602,7 @@ public: if (input()->touch()->decorationPressId() == -1) { return false; } - if (input()->touch()->decorationPressId() != id) { + if (input()->touch()->decorationPressId() != qint32(id)) { // ignore, but filter out return true; } @@ -622,7 +622,7 @@ public: if (input()->touch()->decorationPressId() == -1) { return false; } - if (input()->touch()->decorationPressId() != id) { + if (input()->touch()->decorationPressId() != qint32(id)) { // ignore, but filter out return true; }