diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-10-28 15:03:38 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:08:54 -0300 |
commit | 40fb8375eb99bd308228e1e3d74f2f24273c25c0 (patch) | |
tree | 864fbee43f0573b6fe92d03995e19c78469bcfce /generator/cppgenerator.cpp | |
parent | a35c7951659fb973460a9f96eea5c5ea63fea8fc (diff) |
Uses CPP_SELF_VAR macro and replaces cpp_other by cppOther.
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r-- | generator/cppgenerator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index 77c751871..f5043fafd 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -2759,7 +2759,7 @@ void CppGenerator::writeRichCompareFunction(QTextStream& s, const AbstractMetaCl s << '{' << endl; QList<AbstractMetaFunctionList> cmpOverloads = filterGroupedOperatorFunctions(metaClass, AbstractMetaClass::ComparisonOp); s << INDENT << "bool result = false;" << endl; - s << INDENT << metaClass->qualifiedCppName() << "& cpp_self = *" << cpythonWrapperCPtr(metaClass) << ';' << endl; + s << INDENT << metaClass->qualifiedCppName() << "& " CPP_SELF_VAR " = *" << cpythonWrapperCPtr(metaClass) << ';' << endl; s << endl; s << INDENT << "switch (op) {" << endl; @@ -2808,10 +2808,10 @@ void CppGenerator::writeRichCompareFunction(QTextStream& s, const AbstractMetaCl s << INDENT << "// " << func->signature() << endl; s << INDENT; s << translateTypeForWrapperMethod(type, metaClass, ExcludeReference | ExcludeConst); - s << " cpp_other = "; + s << " cppOther = "; writeToCppConversion(s, type, metaClass, "other", ExcludeReference | ExcludeConst); s << ';' << endl; - s << INDENT << "result = (cpp_self " << op << " cpp_other);" << endl; + s << INDENT << "result = (" CPP_SELF_VAR " " << op << " cppOther);" << endl; } s << INDENT << '}'; } @@ -2827,8 +2827,8 @@ void CppGenerator::writeRichCompareFunction(QTextStream& s, const AbstractMetaCl s << "(other)) {" << endl; { Indentation indent(INDENT); - writeArgumentConversion(s, &temporaryType, "cpp_other", "other", metaClass); - s << INDENT << "result = (cpp_self " << op << " cpp_other);" << endl; + writeArgumentConversion(s, &temporaryType, "cppOther", "other", metaClass); + s << INDENT << "result = (" CPP_SELF_VAR " " << op << " cppOther);" << endl; } s << INDENT << '}'; } |