From 3701543ae8dd8ffbfd58e5648d45699468f10a55 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Thu, 29 Jan 2015 18:44:14 +0100 Subject: FunctionType now returns const ref for Declaration --- InterfaceHandler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'InterfaceHandler.cpp') diff --git a/InterfaceHandler.cpp b/InterfaceHandler.cpp index 4d3ec4d5..92cd5156 100644 --- a/InterfaceHandler.cpp +++ b/InterfaceHandler.cpp @@ -59,9 +59,7 @@ std::unique_ptr InterfaceHandler::getABIInterface(ContractDefinitio } return params; }; - - solAssert(it.second->getDeclaration(), "All function interface types should contain a declaration"); - method["name"] = it.second->getDeclaration()->getName(); + method["name"] = it.second->getDeclaration().getName(); method["constant"] = it.second->isConstant(); method["inputs"] = populateParameters(it.second->getParameterNames(), it.second->getParameterTypeNames()); @@ -86,7 +84,7 @@ unique_ptr InterfaceHandler::getABISolidityInterface(ContractDefinition r += (r.size() ? "," : "(") + _paramTypes[i] + " " + _paramNames[i]; return r.size() ? r + ")" : "()"; }; - ret += "function " + it.second->getDeclaration()->getName() + + ret += "function " + it.second->getDeclaration().getName() + populateParameters(it.second->getParameterNames(), it.second->getParameterTypeNames()) + (it.second->isConstant() ? "constant " : ""); if (it.second->getReturnParameterTypes().size()) -- cgit v1.2.3