forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -70,7 +70,7 @@ IndexItem::Ptr SearchSymbols::operator()(Document::Ptr doc, const QString &scope
|
||||
QTC_ASSERT(_parent->fileName() == Internal::StringTable::insert(doc->fileName()),
|
||||
return IndexItem::Ptr());
|
||||
|
||||
for (unsigned i = 0, ei = doc->globalSymbolCount(); i != ei; ++i)
|
||||
for (int i = 0, ei = doc->globalSymbolCount(); i != ei; ++i)
|
||||
accept(doc->globalSymbolAt(i));
|
||||
|
||||
Internal::StringTable::scheduleGC();
|
||||
@@ -95,7 +95,7 @@ bool SearchSymbols::visit(Enum *symbol)
|
||||
QString newScope = scopedSymbolName(name, symbol);
|
||||
ScopedScope scopeRaii(_scope, newScope);
|
||||
|
||||
for (unsigned i = 0, ei = symbol->memberCount(); i != ei; ++i)
|
||||
for (int i = 0, ei = symbol->memberCount(); i != ei; ++i)
|
||||
accept(symbol->memberAt(i));
|
||||
|
||||
return false;
|
||||
@@ -112,7 +112,7 @@ bool SearchSymbols::visit(Namespace *symbol)
|
||||
QString name = scopedSymbolName(symbol);
|
||||
QString newScope = name;
|
||||
ScopedScope raii(_scope, newScope);
|
||||
for (unsigned i = 0; i < symbol->memberCount(); ++i) {
|
||||
for (int i = 0; i < symbol->memberCount(); ++i) {
|
||||
accept(symbol->memberAt(i));
|
||||
}
|
||||
return false;
|
||||
@@ -321,7 +321,7 @@ void SearchSymbols::processClass(T *clazz)
|
||||
|
||||
QString newScope = scopedSymbolName(name, clazz);
|
||||
ScopedScope scopeRaii(_scope, newScope);
|
||||
for (unsigned i = 0, ei = clazz->memberCount(); i != ei; ++i)
|
||||
for (int i = 0, ei = clazz->memberCount(); i != ei; ++i)
|
||||
accept(clazz->memberAt(i));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user