More clear than operator overload
parent
8d9e108acc
commit
b12255285b
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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_);
|
||||||
|
|
Loading…
Reference in New Issue