aboutsummaryrefslogtreecommitdiffstats
path: root/parser
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-06-28 19:48:53 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:06 -0300
commit51cd6edb17866dbfe96990e3db15273d6d26bf75 (patch)
tree1e99ffecbbf79781888f0628f6b66ac8d6ec2605 /parser
parent068900d4f0af107e03dca9b530fff47deac4066d (diff)
Fixes usage of std::unique method.
std::unique looks for adjacent duplicates in a list, so it needs to be sorted for the algorithm to work in all items.
Diffstat (limited to 'parser')
-rw-r--r--parser/codemodel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/parser/codemodel.cpp b/parser/codemodel.cpp
index 861a6708..41947150 100644
--- a/parser/codemodel.cpp
+++ b/parser/codemodel.cpp
@@ -373,6 +373,7 @@ FunctionModelItem _ScopeModelItem::declaredFunction(FunctionModelItem item)
ClassList _ScopeModelItem::classes() const
{
ClassList result = _M_classes.values();
+ qSort(result);
ClassList::iterator it = std::unique(result.begin(), result.end());
result.erase(it, result.end());
return result;