forked from qt-creator/qt-creator
C++: use argumentCount in loops in initializer.
argumentCount is a more expensive function, so try to call it only once, esp. in loops. Change-Id: I6f0d420352743ec444487ce3f506ef28e5282d1e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -569,7 +569,7 @@ static LanguageUtils::FakeMetaObject::Ptr buildFakeMetaObject(
|
||||
method.setMethodType(FakeMetaMethod::Signal);
|
||||
else
|
||||
method.setMethodType(FakeMetaMethod::Slot);
|
||||
for (unsigned a = 0; a < func->argumentCount(); ++a) {
|
||||
for (unsigned a = 0, argc = func->argumentCount(); a < argc; ++a) {
|
||||
Symbol *arg = func->argumentAt(a);
|
||||
QString name;
|
||||
if (arg->name())
|
||||
|
||||
Reference in New Issue
Block a user