diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-10-29 17:05:46 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:08:55 -0300 |
commit | 7e51b29827d887e8156e0cd48d864ffe356412cc (patch) | |
tree | cc5485d985622eff3377bfa8221b57789f3798aa /generator/cppgenerator.cpp | |
parent | 78d5b68b37b206c81932f188e106b7f239b25cab (diff) |
Don't use ref. on primitive types when using Converter<T>::toPython.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r-- | generator/cppgenerator.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index d01beca9b..1ea5b15d6 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -1477,15 +1477,7 @@ void CppGenerator::writeArgumentConversion(QTextStream& s, bool isWrappedCppClass = type->isValue() || type->isObject(); // exclude const on Objects - Options flags; - bool isCStr = isCString(argType); - if (argType->indirections() && !isCStr) - flags = ExcludeConst; - else if (type->isPrimitive() && !isCStr) - flags = ExcludeConst | ExcludeReference; - else if (type->isValue() && argType->isConstant() && argType->isReference()) - flags = ExcludeConst | ExcludeReference; // const refs become just the value, but pure refs must remain pure. - + Options flags = getConverterOptions(argType); typeName = translateTypeForWrapperMethod(argType, context, flags).trimmed(); if (isWrappedCppClass) |