halstead, reserve aa buckets for each new funct

This commit is contained in:
Basile Burg 2017-02-26 08:04:20 +01:00
parent b668c02f4a
commit 560c5a5df0
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 2 additions and 0 deletions

View File

@ -129,6 +129,8 @@ private final class HalsteadMetric: ASTVisitor
{
operators.clear;
operands.clear;
operators.reserve(64);
operands.reserve(64);
if (functionNesting++ == 0)
functions.length = functions.length + 1;
}