More clear than operator overload

release/4.3a0
dellaert 2014-11-30 00:13:29 +01:00
parent 8d9e108acc
commit b12255285b
3 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ using namespace wrap;
/* ************************************************************************* */ /* ************************************************************************* */
Argument Argument::expandTemplate(const TemplateSubstitution& ts) const { Argument Argument::expandTemplate(const TemplateSubstitution& ts) const {
Argument instArg = *this; Argument instArg = *this;
instArg.type = ts(type); instArg.type = ts.tryToSubstitite(type);
return instArg; return instArg;
} }

View File

@ -17,9 +17,9 @@ using namespace wrap;
/* ************************************************************************* */ /* ************************************************************************* */
ReturnValue ReturnValue::expandTemplate(const TemplateSubstitution& ts) const { ReturnValue ReturnValue::expandTemplate(const TemplateSubstitution& ts) const {
ReturnValue instRetVal = *this; ReturnValue instRetVal = *this;
instRetVal.type1 = ts(type1); instRetVal.type1 = ts.tryToSubstitite(type1);
if (isPair) if (isPair)
instRetVal.type2 = ts(type2); instRetVal.type2 = ts.tryToSubstitite(type2);
return instRetVal; return instRetVal;
} }

View File

@ -44,7 +44,7 @@ public:
} }
// Substitute if needed // Substitute if needed
Qualified operator()(const Qualified& type) const { Qualified tryToSubstitite(const Qualified& type) const {
if (type.name == templateArg_ && type.namespaces.empty()) if (type.name == templateArg_ && type.namespaces.empty())
return qualifiedType_; return qualifiedType_;
else if (type.name == "This") else if (type.name == "This")
@ -54,7 +54,7 @@ public:
} }
// Substitute if needed // Substitute if needed
ReturnType operator()(const ReturnType& type) const { ReturnType tryToSubstitite(const ReturnType& type) const {
ReturnType instType = type; ReturnType instType = type;
if (type.name == templateArg_ && type.namespaces.empty()) if (type.name == templateArg_ && type.namespaces.empty())
instType.rename(qualifiedType_); instType.rename(qualifiedType_);