aboutsummaryrefslogtreecommitdiffstats
path: root/parser
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-19 15:16:10 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:00 -0300
commitba1ec45a45a197a3b1b9a3c00bd3f91a2dea13b8 (patch)
tree697ab4273f19dff78e346fe53f9c5e973e1c1804 /parser
parent9800093dbfb9054354ec04a1a035b7f85f328af4 (diff)
Do not create two AbstractMetaClass for every template class.
Diffstat (limited to 'parser')
-rw-r--r--parser/codemodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser/codemodel.cpp b/parser/codemodel.cpp
index ecc8e303..861a6708 100644
--- a/parser/codemodel.cpp
+++ b/parser/codemodel.cpp
@@ -24,6 +24,7 @@
#include "codemodel.h"
+#include <algorithm>
// ---------------------------------------------------------------------------
CodeModel::CodeModel()
@@ -371,7 +372,10 @@ FunctionModelItem _ScopeModelItem::declaredFunction(FunctionModelItem item)
ClassList _ScopeModelItem::classes() const
{
- return _M_classes.values();
+ ClassList result = _M_classes.values();
+ ClassList::iterator it = std::unique(result.begin(), result.end());
+ result.erase(it, result.end());
+ return result;
}
TypeAliasList _ScopeModelItem::typeAliases() const