aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.h
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-09 21:35:31 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-09 21:35:31 +0800
commit148a7cb3e1bcd4648824285e4f6dc9800d3f6de3 (patch)
tree12eae61e00be2356bd278ae127ab29f050dbb509 /ExpressionCompiler.h
parent7c0ae1a82f28f3a3679ee7160d0080eac9ca5b9c (diff)
downloaddexon-solidity-148a7cb3e1bcd4648824285e4f6dc9800d3f6de3.tar.gz
dexon-solidity-148a7cb3e1bcd4648824285e4f6dc9800d3f6de3.tar.zst
dexon-solidity-148a7cb3e1bcd4648824285e4f6dc9800d3f6de3.zip
ExpressionCompiler's enums to CamelCase
Diffstat (limited to 'ExpressionCompiler.h')
-rw-r--r--ExpressionCompiler.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h
index 006858cb..ffb9ff19 100644
--- a/ExpressionCompiler.h
+++ b/ExpressionCompiler.h
@@ -120,7 +120,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);
@@ -130,15 +130,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).
@@ -162,7 +162,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;