From b12255285b7840ba0b98bba4b47e527240ddc675 Mon Sep 17 00:00:00 2001 From: dellaert Date: Sun, 30 Nov 2014 00:13:29 +0100 Subject: [PATCH] More clear than operator overload --- wrap/Argument.cpp | 2 +- wrap/ReturnValue.cpp | 4 ++-- wrap/TemplateSubstitution.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wrap/Argument.cpp b/wrap/Argument.cpp index 2350a77d7..6a5675a44 100644 --- a/wrap/Argument.cpp +++ b/wrap/Argument.cpp @@ -32,7 +32,7 @@ using namespace wrap; /* ************************************************************************* */ Argument Argument::expandTemplate(const TemplateSubstitution& ts) const { Argument instArg = *this; - instArg.type = ts(type); + instArg.type = ts.tryToSubstitite(type); return instArg; } diff --git a/wrap/ReturnValue.cpp b/wrap/ReturnValue.cpp index 54e585cad..596acb2c3 100644 --- a/wrap/ReturnValue.cpp +++ b/wrap/ReturnValue.cpp @@ -17,9 +17,9 @@ using namespace wrap; /* ************************************************************************* */ ReturnValue ReturnValue::expandTemplate(const TemplateSubstitution& ts) const { ReturnValue instRetVal = *this; - instRetVal.type1 = ts(type1); + instRetVal.type1 = ts.tryToSubstitite(type1); if (isPair) - instRetVal.type2 = ts(type2); + instRetVal.type2 = ts.tryToSubstitite(type2); return instRetVal; } diff --git a/wrap/TemplateSubstitution.h b/wrap/TemplateSubstitution.h index b20a1af6f..52c29f571 100644 --- a/wrap/TemplateSubstitution.h +++ b/wrap/TemplateSubstitution.h @@ -44,7 +44,7 @@ public: } // Substitute if needed - Qualified operator()(const Qualified& type) const { + Qualified tryToSubstitite(const Qualified& type) const { if (type.name == templateArg_ && type.namespaces.empty()) return qualifiedType_; else if (type.name == "This") @@ -54,7 +54,7 @@ public: } // Substitute if needed - ReturnType operator()(const ReturnType& type) const { + ReturnType tryToSubstitite(const ReturnType& type) const { ReturnType instType = type; if (type.name == templateArg_ && type.namespaces.empty()) instType.rename(qualifiedType_);