diff options
author | Christian <c@ethdev.com> | 2014-12-06 09:19:10 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-08 19:53:56 +0800 |
commit | 13640d7db82562592958fcce2d7ce8155cc7ea35 (patch) | |
tree | a27fc38d8fb642ad602d875e3218542adb533de5 /Compiler.cpp | |
parent | c78c330634997e5d8e2ec27db9e3d9cf50bae230 (diff) | |
download | dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar.gz dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar.zst dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.zip |
Clear separation between ASTVisitor and ASTConstVisitor and more const specifiers.
Diffstat (limited to 'Compiler.cpp')
-rw-r--r-- | Compiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Compiler.cpp b/Compiler.cpp index 8c5d26f1..601a679a 100644 --- a/Compiler.cpp +++ b/Compiler.cpp @@ -292,7 +292,7 @@ bool Compiler::visit(Break const&) bool Compiler::visit(Return const& _return) { //@todo modifications are needed to make this work with functions returning multiple values - if (Expression* expression = _return.getExpression()) + if (Expression const* expression = _return.getExpression()) { ExpressionCompiler::compileExpression(m_context, *expression); VariableDeclaration const& firstVariable = *_return.getFunctionReturnParameters().getParameters().front(); @@ -307,7 +307,7 @@ bool Compiler::visit(Return const& _return) bool Compiler::visit(VariableDefinition const& _variableDefinition) { - if (Expression* expression = _variableDefinition.getExpression()) + if (Expression const* expression = _variableDefinition.getExpression()) { ExpressionCompiler::compileExpression(m_context, *expression); ExpressionCompiler::appendTypeConversion(m_context, @@ -322,7 +322,7 @@ bool Compiler::visit(VariableDefinition const& _variableDefinition) bool Compiler::visit(ExpressionStatement const& _expressionStatement) { - Expression& expression = _expressionStatement.getExpression(); + Expression const& expression = _expressionStatement.getExpression(); ExpressionCompiler::compileExpression(m_context, expression); // Type::Category category = expression.getType()->getCategory(); for (unsigned i = 0; i < expression.getType()->getSizeOnStack(); ++i) |