diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-07 09:27:05 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-07 09:27:05 +0800 |
commit | 24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5 (patch) | |
tree | c0ef3cf3e2f99bf10383aaafcd3c6144d3d12723 /Types.cpp | |
parent | b2aa3baded2a81420f371569ec58c60f0ce3f841 (diff) | |
download | dexon-solidity-24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5.tar dexon-solidity-24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5.tar.gz dexon-solidity-24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5.tar.bz2 dexon-solidity-24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5.tar.lz dexon-solidity-24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5.tar.xz dexon-solidity-24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5.tar.zst dexon-solidity-24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5.zip |
FunctionType also gets CanonicalSignature
- also using iterators in the signature creation function
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -452,6 +452,17 @@ unsigned FunctionType::getSizeOnStack() const } } +std::string FunctionType::getCanonicalSignature() const +{ + auto parameters = getParameterTypes(); + std::string ret = "NAME("; //TODO: how to get function name from FunctionType + + for (auto it = parameters.cbegin(); it != parameters.cend(); ++it) + ret += (*it)->toString() + (it + 1 == m_parameterTypes.end() ? "" : ","); + + return ret + ")"; +} + bool MappingType::operator==(Type const& _other) const { if (_other.getCategory() != getCategory()) |