diff options
author | Gav Wood <g@ethdev.com> | 2015-01-30 07:44:42 +0800 |
---|---|---|
committer | Gav Wood <g@ethdev.com> | 2015-01-30 07:44:42 +0800 |
commit | dc6f9e3ac0370835b6db8136ba39ea7100ae93a1 (patch) | |
tree | 6b8c569ec7377da58425fe00b1ed6548f46855fb /Types.cpp | |
parent | a604202f33f1f7dc3abda1080e1bc02b2a2cbcb3 (diff) | |
parent | 8d5ee59ee5bd14ab31a6b6c10015df3334b6b641 (diff) | |
download | dexon-solidity-dc6f9e3ac0370835b6db8136ba39ea7100ae93a1.tar.gz dexon-solidity-dc6f9e3ac0370835b6db8136ba39ea7100ae93a1.tar.zst dexon-solidity-dc6f9e3ac0370835b6db8136ba39ea7100ae93a1.zip |
Merge pull request #893 from chriseth/sol_events
Events in Solidity
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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()) |