diff options
author | Christian <c@ethdev.com> | 2014-10-20 19:02:06 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-20 19:02:06 +0800 |
commit | f0c334670dfef7c1b1d1ae610cf19ae9ad2822ca (patch) | |
tree | 7979e36c4b962bb3da82f86df52518b321bca947 /Types.h | |
parent | 646f106a34f189b225745a079fdc8560b9230e68 (diff) | |
download | dexon-solidity-f0c334670dfef7c1b1d1ae610cf19ae9ad2822ca.tar.gz dexon-solidity-f0c334670dfef7c1b1d1ae610cf19ae9ad2822ca.tar.zst dexon-solidity-f0c334670dfef7c1b1d1ae610cf19ae9ad2822ca.zip |
Coding style cleanup: const and vecptr.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -64,8 +64,8 @@ public: static ptr<Type> forLiteral(Literal const& _literal); virtual Category getCategory() const = 0; - virtual bool isImplicitlyConvertibleTo(const Type&) const { return false; } - virtual bool isExplicitlyConvertibleTo(const Type& _convertTo) const + virtual bool isImplicitlyConvertibleTo(Type const&) const { return false; } + virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const { return isImplicitlyConvertibleTo(_convertTo); } @@ -87,7 +87,7 @@ public: explicit IntegerType(int _bits, Modifier _modifier = Modifier::UNSIGNED); virtual bool isImplicitlyConvertibleTo(Type const& _convertTo) const override; - virtual bool isExplicitlyConvertibleTo(const Type& _convertTo) const override; + virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const override; virtual bool acceptsBinaryOperator(Token::Value _operator) const override; virtual bool acceptsUnaryOperator(Token::Value _operator) const override; @@ -104,11 +104,11 @@ class BoolType: public Type { public: virtual Category getCategory() const { return Category::BOOL; } - virtual bool isImplicitlyConvertibleTo(const Type& _convertTo) const override + virtual bool isImplicitlyConvertibleTo(Type const& _convertTo) const override { return _convertTo.getCategory() == Category::BOOL; } - virtual bool isExplicitlyConvertibleTo(const Type& _convertTo) const override; + virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const override; virtual bool acceptsBinaryOperator(Token::Value _operator) const override { return _operator == Token::AND || _operator == Token::OR; |