summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/generator.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-02-19 18:52:19 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-20 11:28:10 +0100
commit44ab16f93d4007f0bbd1591e2830bae0332aeef2 (patch)
tree4cee0a2d836761a16464fc07d324fac2724edcd1 /src/tools/moc/generator.cpp
parentfec37f0e9a9e4c18fd20f7b39919f08c7cb2139e (diff)
Small moc cleanup: Pass lists by const reference
generateFunctions() shouldn't (and doesn't) modify the list of functions, so the list should be passed by const reference. Change-Id: If5ff810e5623e734816c3089eb8b3fd4f54f2345 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/tools/moc/generator.cpp')
-rw-r--r--src/tools/moc/generator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 937a62e87c..3362a1abc1 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -443,7 +443,7 @@ void Generator::generateClassInfos()
}
}
-void Generator::generateFunctions(QList<FunctionDef>& list, const char *functype, int type)
+void Generator::generateFunctions(const QList<FunctionDef>& list, const char *functype, int type)
{
if (list.isEmpty())
return;
@@ -492,7 +492,7 @@ void Generator::generateFunctions(QList<FunctionDef>& list, const char *functype
}
}
-void Generator::generateFunctionRevisions(QList<FunctionDef>& list, const char *functype)
+void Generator::generateFunctionRevisions(const QList<FunctionDef>& list, const char *functype)
{
if (list.count())
fprintf(out, "\n // %ss: revision\n", functype);