aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Matcher.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-07-24 18:40:10 +0200
committerhjk <hjk@qt.io>2019-07-26 09:23:48 +0000
commit7ab6783e24c6a05a67f319817cd1bdd026a7ce43 (patch)
tree8b56ea311d333f45f300b915c3bd25a2b77b4aef /src/libs/3rdparty/cplusplus/Matcher.cpp
parenteab0df22f98fab37585e4513de836a06e4aa05d5 (diff)
Standardize on int for line and column values
Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Matcher.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Matcher.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/3rdparty/cplusplus/Matcher.cpp b/src/libs/3rdparty/cplusplus/Matcher.cpp
index ffb852a67c..8ef26017c6 100644
--- a/src/libs/3rdparty/cplusplus/Matcher.cpp
+++ b/src/libs/3rdparty/cplusplus/Matcher.cpp
@@ -293,7 +293,7 @@ bool Matcher::match(const ObjCMethod *type, const ObjCMethod *otherType)
else if (! type->returnType().match(otherType->returnType(), this))
return false;
- for (unsigned i = 0; i < type->argumentCount(); ++i) {
+ for (int i = 0; i < type->argumentCount(); ++i) {
Symbol *l = type->argumentAt(i);
Symbol *r = otherType->argumentAt(i);
if (! l->type().match(r->type(), this))
@@ -356,10 +356,10 @@ bool Matcher::match(const QualifiedNameId *name, const QualifiedNameId *otherNam
bool Matcher::match(const SelectorNameId *name, const SelectorNameId *otherName)
{
- const unsigned nc = name->nameCount();
+ const int nc = name->nameCount();
if (name->hasArguments() != otherName->hasArguments() || nc != otherName->nameCount())
return false;
- for (unsigned i = 0; i < nc; ++i)
+ for (int i = 0; i < nc; ++i)
if (! Matcher::match(name->nameAt(i), otherName->nameAt(i), this))
return false;
return true;