Rename 'asMemberFunction' to widen its purpose.

This commit is contained in:
chriseth
2018-11-22 15:24:45 +01:00
parent dc748bc771
commit 9e964852cc
2 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -443,7 +443,7 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ContractDefinition
continue;
seenFunctions.insert(function);
FunctionType funType(*function, false);
if (auto fun = funType.asMemberFunction(true, true))
if (auto fun = funType.asCallableFunction(true, true))
if (_type.isImplicitlyConvertibleTo(*fun->selfType()))
members.push_back(MemberList::Member(function->name(), fun, function));
}
@@ -1970,7 +1970,7 @@ MemberList::MemberMap ContractType::nativeMembers(ContractDefinition const* _con
for (auto const& it: m_contract.interfaceFunctions())
members.push_back(MemberList::Member(
it.second->declaration().name(),
it.second->asMemberFunction(m_contract.isLibrary()),
it.second->asCallableFunction(m_contract.isLibrary()),
&it.second->declaration()
));
}
@@ -3059,7 +3059,7 @@ TypePointer FunctionType::copyAndSetGasOrValue(bool _setGas, bool _setValue) con
);
}
FunctionTypePointer FunctionType::asMemberFunction(bool _inLibrary, bool _bound) const
FunctionTypePointer FunctionType::asCallableFunction(bool _inLibrary, bool _bound) const
{
if (_bound && m_parameterTypes.empty())
return FunctionTypePointer();
@@ -3201,7 +3201,7 @@ MemberList::MemberMap TypeType::nativeMembers(ContractDefinition const* _current
if (function->isVisibleAsLibraryMember())
members.push_back(MemberList::Member(
function->name(),
FunctionType(*function).asMemberFunction(true),
FunctionType(*function).asCallableFunction(true),
function
));
if (isBase)