Refactor json return type generation.

This commit is contained in:
chriseth
2017-01-26 18:21:19 +01:00
parent ff8008cdf7
commit a9c6ff4ac8
5 changed files with 49 additions and 51 deletions
-18
View File
@@ -2512,24 +2512,6 @@ FunctionTypePointer FunctionType::asMemberFunction(bool _inLibrary, bool _bound)
);
}
vector<string> const FunctionType::parameterTypeNames(bool _addDataLocation) const
{
vector<string> names;
for (TypePointer const& t: parameterTypes())
names.push_back(t->canonicalName(_addDataLocation));
return names;
}
vector<string> const FunctionType::returnParameterTypeNames(bool _addDataLocation) const
{
vector<string> names;
for (TypePointer const& t: m_returnParameterTypes)
names.push_back(t->canonicalName(_addDataLocation));
return names;
}
TypePointer const& FunctionType::selfType() const
{
solAssert(bound(), "Function is not bound.");
-2
View File
@@ -915,10 +915,8 @@ public:
TypePointers parameterTypes() const;
std::vector<std::string> parameterNames() const;
std::vector<std::string> const parameterTypeNames(bool _addDataLocation) const;
TypePointers const& returnParameterTypes() const { return m_returnParameterTypes; }
std::vector<std::string> const& returnParameterNames() const { return m_returnParameterNames; }
std::vector<std::string> const returnParameterTypeNames(bool _addDataLocation) const;
/// @returns the "self" parameter type for a bound function
TypePointer const& selfType() const;