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:
Erik Verbruggen
2013-03-13 12:51:58 +01:00
parent fb28c14541
commit bdb5142102
9 changed files with 25 additions and 22 deletions

View File

@@ -145,7 +145,7 @@ public:
funTy->setReturnType(rewrite->rewriteType(type->returnType()));
for (unsigned i = 0; i < type->argumentCount(); ++i) {
for (unsigned i = 0, argc = type->argumentCount(); i < argc; ++i) {
Symbol *arg = type->argumentAt(i);
Argument *newArg = control()->newArgument(0, 0);