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