Browse Source

Stylistic changes.

cl-refactor
Christian 10 years ago
parent
commit
0d6e69ef53
  1. 5
      libsolidity/ExpressionCompiler.cpp
  2. 3
      libsolidity/ExpressionCompiler.h
  3. 2
      libsolidity/LValue.h

5
libsolidity/ExpressionCompiler.cpp

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

3
libsolidity/ExpressionCompiler.h

@ -26,6 +26,7 @@
#include <boost/noncopyable.hpp>
#include <libdevcore/Common.h>
#include <libevmcore/SourceLocation.h>
#include <libsolidity/Utils.h>
#include <libsolidity/ASTVisitor.h>
#include <libsolidity/LValue.h>
@ -133,7 +134,7 @@ private:
template <class _LValueType, class... _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...));
if (_expression.lvalueRequested())
m_currentLValue = move(lvalue);

2
libsolidity/LValue.h

@ -53,7 +53,7 @@ public:
/// 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.
/// 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,
SourceLocation const& _location = SourceLocation(), bool _move = false) const = 0;
/// Stores zero in the lvalue.

Loading…
Cancel
Save