diff options
author | chriseth <c@ethdev.com> | 2015-02-10 17:54:28 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-02-10 17:54:28 +0800 |
commit | bb6f181d7dacfd1d7a070483500937004bea995c (patch) | |
tree | 1e5f2fd0cfc36afdc3ba2efc3d340d6e3f81cd80 /ExpressionCompiler.h | |
parent | bbf695b0e1b60526b9bf6beaeabe8b031c02bf5d (diff) | |
parent | 82c5fb32458309866033e12b8930a450753bc0bd (diff) | |
download | dexon-solidity-bb6f181d7dacfd1d7a070483500937004bea995c.tar.gz dexon-solidity-bb6f181d7dacfd1d7a070483500937004bea995c.tar.zst dexon-solidity-bb6f181d7dacfd1d7a070483500937004bea995c.zip |
Merge pull request #986 from LefterisJP/sol_StyleFix
Solidity enum style fix
Diffstat (limited to 'ExpressionCompiler.h')
-rw-r--r-- | ExpressionCompiler.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index adfe8e52..df8a0516 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -118,7 +118,7 @@ private: class LValue { public: - enum LValueType { NONE, STACK, MEMORY, STORAGE }; + enum class LValueType { None, Stack, Memory, Storage }; explicit LValue(CompilerContext& _compilerContext): m_context(&_compilerContext) { reset(); } LValue(CompilerContext& _compilerContext, LValueType _type, Type const& _dataType, unsigned _baseStackOffset = 0); @@ -128,15 +128,15 @@ private: void fromIdentifier(Identifier const& _identifier, Declaration const& _declaration); /// Convenience function to set type for a state variable and retrieve the reference void fromStateVariable(Declaration const& _varDecl, TypePointer const& _type); - void reset() { m_type = NONE; m_baseStackOffset = 0; m_size = 0; } + void reset() { m_type = LValueType::None; m_baseStackOffset = 0; m_size = 0; } - bool isValid() const { return m_type != NONE; } - bool isInOnStack() const { return m_type == STACK; } - bool isInMemory() const { return m_type == MEMORY; } - bool isInStorage() const { return m_type == STORAGE; } + bool isValid() const { return m_type != LValueType::None; } + bool isInOnStack() const { return m_type == LValueType::Stack; } + bool isInMemory() const { return m_type == LValueType::Memory; } + bool isInStorage() const { return m_type == LValueType::Storage; } /// @returns true if this lvalue reference type occupies a slot on the stack. - bool storesReferenceOnStack() const { return m_type == STORAGE || m_type == MEMORY; } + bool storesReferenceOnStack() const { return m_type == LValueType::Storage || m_type == LValueType::Memory; } /// Copies the value of the current lvalue to the top of the stack and, if @a _remove is true, /// also removes the reference from the stack (note that is does not reset the type to @a NONE). @@ -160,7 +160,7 @@ private: void retrieveValueFromStorage(TypePointer const& _type, bool _remove = false) const; CompilerContext* m_context; - LValueType m_type = NONE; + LValueType m_type = LValueType::None; /// If m_type is STACK, this is base stack offset (@see /// CompilerContext::getBaseStackOffsetOfVariable) of a local variable. unsigned m_baseStackOffset = 0; |