aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-01-30 08:05:17 +0800
committerGav Wood <i@gavwood.com>2015-01-30 08:05:17 +0800
commit8e84dc27a7b2bca0148e33209e0f80457cfce74a (patch)
treec6d9b5be1aebe9723bfa482ac44dff8a8b3c7cad /Types.cpp
parentf46df7cb92bba6f30184cc47af3aab8cda672048 (diff)
parentdc6f9e3ac0370835b6db8136ba39ea7100ae93a1 (diff)
downloaddexon-solidity-8e84dc27a7b2bca0148e33209e0f80457cfce74a.tar.gz
dexon-solidity-8e84dc27a7b2bca0148e33209e0f80457cfce74a.tar.zst
dexon-solidity-8e84dc27a7b2bca0148e33209e0f80457cfce74a.zip
Merge branch 'develop' of github.com:ethereum/cpp-ethereum into develop
Conflicts: test/SolidityEndToEndTest.cpp test/SolidityNameAndTypeResolution.cpp test/SolidityParser.cpp
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Types.cpp b/Types.cpp
index afc1c1db..ab401332 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -633,6 +633,22 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl):
swap(retParamNames, m_returnParameterNames);
}
+FunctionType::FunctionType(const EventDefinition& _event):
+ m_location(Location::EVENT), m_declaration(&_event)
+{
+ TypePointers params;
+ vector<string> paramNames;
+ params.reserve(_event.getParameters().size());
+ paramNames.reserve(_event.getParameters().size());
+ for (ASTPointer<VariableDeclaration> const& var: _event.getParameters())
+ {
+ paramNames.push_back(var->getName());
+ params.push_back(var->getType());
+ }
+ swap(params, m_parameterTypes);
+ swap(paramNames, m_parameterNames);
+}
+
bool FunctionType::operator==(Type const& _other) const
{
if (_other.getCategory() != getCategory())