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 /Types.cpp | |
parent | ffeb7daf11a3186d01d75b4bcdfbbbd106d07680 (diff) | |
download | dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.gz dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.bz2 dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.lz dexon-solidity-dcda38cf3806c1d4205136c55d17f1e73eda48c1.tar.xz 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 'Types.cpp')
-rw-r--r-- | Types.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -192,11 +192,11 @@ u256 IntegerType::literalValue(Literal const& _literal) const return u256(value); } -TypePointer IntegerType::binaryOperatorResultImpl(Token::Value _operator, TypePointer const& _this, TypePointer const& _other) const +TypePointer IntegerType::binaryOperatorResult(Token::Value _operator, TypePointer const& _other) const { if (getCategory() != _other->getCategory()) return TypePointer(); - auto commonType = dynamic_pointer_cast<IntegerType const>(Type::commonType(_this, _other)); + auto commonType = dynamic_pointer_cast<IntegerType const>(Type::commonType(shared_from_this(), _other)); if (!commonType) return TypePointer(); @@ -288,12 +288,12 @@ u256 BoolType::literalValue(Literal const& _literal) const BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Bool type constructed from non-boolean literal.")); } -TypePointer BoolType::binaryOperatorResultImpl(Token::Value _operator, TypePointer const& _this, TypePointer const& _other) const +TypePointer BoolType::binaryOperatorResult(Token::Value _operator, TypePointer const& _other) const { if (getCategory() != _other->getCategory()) return TypePointer(); if (Token::isCompareOp(_operator) || _operator == Token::AND || _operator == Token::OR) - return _this; + return _other; else return TypePointer(); } |