Navigation Menu

Skip to content

Commit

Permalink
Minor optimization in FPTree::calculatePrefixPaths().
Browse files Browse the repository at this point in the history
  • Loading branch information
wimleers committed Feb 22, 2011
1 parent 88b7ec3 commit 57aae4d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/Analytics/FPTree.cpp
Expand Up @@ -77,9 +77,12 @@ namespace Analytics {
}

// Store the built prefix path & clear it, so we can calculate the
// next.
prefixPaths.append(prefixPath);
prefixPath.clear();
// next. Of course only if there *is* a prefix path, which is not
// the case if the given itemID is at the root level.
if (prefixPath.size() > 0) {
prefixPaths.append(prefixPath);
prefixPath.clear();
}
}

return prefixPaths;
Expand Down

0 comments on commit 57aae4d

Please sign in to comment.