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.
This commit is contained in:
parent
67f7e8da34
commit
f9baa22f0d
1 changed files with 2 additions and 2 deletions
|
@ -602,7 +602,7 @@ public:
|
||||||
if (input()->touch()->decorationPressId() == -1) {
|
if (input()->touch()->decorationPressId() == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (input()->touch()->decorationPressId() != id) {
|
if (input()->touch()->decorationPressId() != qint32(id)) {
|
||||||
// ignore, but filter out
|
// ignore, but filter out
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -622,7 +622,7 @@ public:
|
||||||
if (input()->touch()->decorationPressId() == -1) {
|
if (input()->touch()->decorationPressId() == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (input()->touch()->decorationPressId() != id) {
|
if (input()->touch()->decorationPressId() != qint32(id)) {
|
||||||
// ignore, but filter out
|
// ignore, but filter out
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue