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:
@@ -140,7 +140,7 @@ private:
|
||||
|
||||
fun->setReturnType(q->apply(funTy->returnType()));
|
||||
|
||||
for (unsigned i = 0; i < funTy->argumentCount(); ++i) {
|
||||
for (unsigned i = 0, argc = funTy->argumentCount(); i < argc; ++i) {
|
||||
Argument *originalArgument = funTy->argumentAt(i)->asArgument();
|
||||
Argument *arg = control()->newArgument(/*sourceLocation*/ 0,
|
||||
originalArgument->name());
|
||||
|
||||
Reference in New Issue
Block a user