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_);