aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-05-17 18:24:15 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:02 -0300
commitc8438a7ce830aa3151f12e71721b9457b33be41d (patch)
tree518e52b4d987f4c79fd883e731af0bde62d616ed
parent7104ff092dd4c8891422b5febec7aed459a1b393 (diff)
Do not copy the QList, use a const reference instead.
QList copy is cheap, because it's implicity shared, but const references are much more cheap indeed.
-rw-r--r--abstractmetabuilder.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 4281b2b6..16047a64 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -2623,11 +2623,7 @@ AbstractMetaClassList AbstractMetaBuilder::classesTopologicalSorted(const Abstra
QHash<QString, int> map;
QHash<int, AbstractMetaClass*> reverseMap;
- AbstractMetaClassList classList;
- if (cppClass)
- classList = cppClass->innerClasses();
- else
- classList = m_metaClasses;
+ const AbstractMetaClassList& classList = cppClass ? cppClass->innerClasses() : m_metaClasses;
Graph graph(classList.count());