aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-07 01:55:31 +0800
committerChristian <c@ethdev.com>2015-01-09 22:09:10 +0800
commitdcda38cf3806c1d4205136c55d17f1e73eda48c1 (patch)
treea9332d91cbad1eff5e10ebbebf1ab6bee8ac999c /Types.cpp
parentffeb7daf11a3186d01d75b4bcdfbbbd106d07680 (diff)
downloaddexon-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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Types.cpp b/Types.cpp
index 01fa7734..d1a3c7a7 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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();
}