diff options
author | Christian <c@ethdev.com> | 2015-01-07 01:55:31 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-09 22:09:10 +0800 |
commit | dcda38cf3806c1d4205136c55d17f1e73eda48c1 (patch) | |
tree | a9332d91cbad1eff5e10ebbebf1ab6bee8ac999c /AST.cpp | |
parent | ffeb7daf11a3186d01d75b4bcdfbbbd106d07680 (diff) | |
download | dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.gz dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.zst dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.zip |
Use shared_from_this instead of manually supplying a shared_ptr to this.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -193,8 +193,8 @@ void Assignment::checkTypeRequirements() { // compound assignment m_rightHandSide->checkTypeRequirements(); - TypePointer resultType = Type::binaryOperatorResult(Token::AssignmentToBinaryOp(m_assigmentOperator), - m_type, m_rightHandSide->getType()); + TypePointer resultType = m_type->binaryOperatorResult(Token::AssignmentToBinaryOp(m_assigmentOperator), + m_rightHandSide->getType()); if (!resultType || *resultType != *m_type) BOOST_THROW_EXCEPTION(createTypeError("Operator not compatible with type.")); } @@ -237,7 +237,7 @@ void BinaryOperation::checkTypeRequirements() { m_left->checkTypeRequirements(); m_right->checkTypeRequirements(); - m_commonType = Type::binaryOperatorResult(m_operator, m_left->getType(), m_right->getType()); + m_commonType = m_left->getType()->binaryOperatorResult(m_operator, m_right->getType()); if (!m_commonType) BOOST_THROW_EXCEPTION(createTypeError("Operator " + string(Token::toString(m_operator)) + " not compatible with types " + |