Stylistic changes.

This commit is contained in:
Christian 2015-02-25 16:00:23 +01:00
parent 29c614ebaf
commit 66b6860eb8
3 changed files with 6 additions and 4 deletions

View File

@ -153,7 +153,8 @@ void ExpressionCompiler::appendTypeConversion(Type const& _typeOnStack, Type con
else if (stackTypeCategory == Type::Category::Enum) else if (stackTypeCategory == Type::Category::Enum)
solAssert(targetTypeCategory == Type::Category::Integer || solAssert(targetTypeCategory == Type::Category::Integer ||
targetTypeCategory == Type::Category::Enum, ""); targetTypeCategory == Type::Category::Enum, "");
else if (stackTypeCategory == Type::Category::Integer || stackTypeCategory == Type::Category::Contract || else if (stackTypeCategory == Type::Category::Integer ||
stackTypeCategory == Type::Category::Contract ||
stackTypeCategory == Type::Category::IntegerConstant) stackTypeCategory == Type::Category::IntegerConstant)
{ {
if (targetTypeCategory == Type::Category::String && stackTypeCategory == Type::Category::Integer) if (targetTypeCategory == Type::Category::String && stackTypeCategory == Type::Category::Integer)

View File

@ -26,6 +26,7 @@
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <libdevcore/Common.h> #include <libdevcore/Common.h>
#include <libevmcore/SourceLocation.h> #include <libevmcore/SourceLocation.h>
#include <libsolidity/Utils.h>
#include <libsolidity/ASTVisitor.h> #include <libsolidity/ASTVisitor.h>
#include <libsolidity/LValue.h> #include <libsolidity/LValue.h>
@ -133,7 +134,7 @@ private:
template <class _LValueType, class... _Arguments> template <class _LValueType, class... _Arguments>
void ExpressionCompiler::setLValue(Expression const& _expression, _Arguments const&... _arguments) void ExpressionCompiler::setLValue(Expression const& _expression, _Arguments const&... _arguments)
{ {
solAssert(!m_currentLValue, "Current LValue not reset when trying to set to new one."); solAssert(!m_currentLValue, "Current LValue not reset before trying to set new one.");
std::unique_ptr<_LValueType> lvalue(new _LValueType(m_context, _arguments...)); std::unique_ptr<_LValueType> lvalue(new _LValueType(m_context, _arguments...));
if (_expression.lvalueRequested()) if (_expression.lvalueRequested())
m_currentLValue = move(lvalue); m_currentLValue = move(lvalue);

View File

@ -53,7 +53,7 @@ public:
/// Moves a value from the stack to the lvalue. Removes the value if @a _move is true. /// Moves a value from the stack to the lvalue. Removes the value if @a _move is true.
/// @a _location is the source location of the expression that caused this operation. /// @a _location is the source location of the expression that caused this operation.
/// Stack pre: value [lvalue_ref] /// Stack pre: value [lvalue_ref]
/// Stack post if !_move: value_of(lvalue_ref) /// Stack post: if !_move: value_of(lvalue_ref)
virtual void storeValue(Type const& _sourceType, virtual void storeValue(Type const& _sourceType,
SourceLocation const& _location = SourceLocation(), bool _move = false) const = 0; SourceLocation const& _location = SourceLocation(), bool _move = false) const = 0;
/// Stores zero in the lvalue. /// Stores zero in the lvalue.