diff options
author | chriseth <c@ethdev.com> | 2015-01-19 18:32:11 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-01-19 18:32:11 +0800 |
commit | 325b052b164992b6c19cb5c4550680d7f2a8e380 (patch) | |
tree | 36fa6cea3f87dd66ea61f7823c2329027e2dcf4b /Types.h | |
parent | 930532165cdc0404120a5f0c76ff6d7673ff2222 (diff) | |
parent | c3d36d1fe197156427cd8adb4edbf955bba0531a (diff) | |
download | dexon-solidity-325b052b164992b6c19cb5c4550680d7f2a8e380.tar.gz dexon-solidity-325b052b164992b6c19cb5c4550680d7f2a8e380.tar.zst dexon-solidity-325b052b164992b6c19cb5c4550680d7f2a8e380.zip |
Merge pull request #805 from LianaHus/deleteStruct
delete for structs
-added functionality to set values to 0 when deleting structure(not for ...
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -259,10 +259,7 @@ public: BoolType() {} virtual Category getCategory() const { return Category::BOOL; } virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const override; - virtual TypePointer unaryOperatorResult(Token::Value _operator) const override - { - return (_operator == Token::NOT || _operator == Token::DELETE) ? shared_from_this() : TypePointer(); - } + virtual TypePointer unaryOperatorResult(Token::Value _operator) const override; virtual TypePointer binaryOperatorResult(Token::Value _operator, TypePointer const& _other) const override; virtual unsigned getCalldataEncodedSize() const { return 1; } @@ -284,8 +281,8 @@ public: virtual bool isImplicitlyConvertibleTo(Type const& _convertTo) const override; /// Contracts can be converted to themselves and to integers. virtual bool isExplicitlyConvertibleTo(Type const& _convertTo) const override; + virtual TypePointer unaryOperatorResult(Token::Value _operator) const override; virtual bool operator==(Type const& _other) const override; - virtual u256 getStorageSize() const override; virtual bool isValueType() const override { return true; } virtual std::string toString() const override; @@ -317,11 +314,7 @@ class StructType: public Type public: virtual Category getCategory() const override { return Category::STRUCT; } StructType(StructDefinition const& _struct): m_struct(_struct) {} - virtual TypePointer unaryOperatorResult(Token::Value _operator) const override - { - return _operator == Token::DELETE ? shared_from_this() : TypePointer(); - } - + virtual TypePointer unaryOperatorResult(Token::Value _operator) const override; virtual bool operator==(Type const& _other) const override; virtual u256 getStorageSize() const override; virtual bool canLiveOutsideStorage() const override; |