aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r--libsolidity/codegen/ArrayUtils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/codegen/ArrayUtils.cpp b/libsolidity/codegen/ArrayUtils.cpp
index f6cb7aac..0b09cc1a 100644
--- a/libsolidity/codegen/ArrayUtils.cpp
+++ b/libsolidity/codegen/ArrayUtils.cpp
@@ -572,7 +572,7 @@ void ArrayUtils::clearArray(ArrayType const& _typeIn) const
ArrayUtils(_context).convertLengthToSize(_type);
_context << Instruction::ADD << Instruction::SWAP1;
if (_type.baseType()->storageBytes() < 32)
- ArrayUtils(_context).clearStorageLoop(IntegerType(256));
+ ArrayUtils(_context).clearStorageLoop(*make_shared<IntegerType>(256));
else
ArrayUtils(_context).clearStorageLoop(*_type.baseType());
_context << Instruction::POP;
@@ -613,7 +613,7 @@ void ArrayUtils::clearDynamicArray(ArrayType const& _type) const
<< Instruction::SWAP1;
// stack: data_pos_end data_pos
if (_type.isByteArray() || _type.baseType()->storageBytes() < 32)
- clearStorageLoop(IntegerType(256));
+ clearStorageLoop(*make_shared<IntegerType>(256));
else
clearStorageLoop(*_type.baseType());
// cleanup
@@ -720,7 +720,7 @@ void ArrayUtils::resizeDynamicArray(ArrayType const& _typeIn) const
ArrayUtils(_context).convertLengthToSize(_type);
_context << Instruction::DUP2 << Instruction::ADD << Instruction::SWAP1;
// stack: ref new_length current_length first_word data_location_end data_location
- ArrayUtils(_context).clearStorageLoop(IntegerType(256));
+ ArrayUtils(_context).clearStorageLoop(*make_shared<IntegerType>(256));
_context << Instruction::POP;
// stack: ref new_length current_length first_word
solAssert(_context.stackHeight() - stackHeightStart == 4 - 2, "3");
@@ -759,7 +759,7 @@ void ArrayUtils::resizeDynamicArray(ArrayType const& _typeIn) const
_context << Instruction::SWAP2 << Instruction::ADD;
// stack: ref new_length delete_end delete_start
if (_type.isByteArray() || _type.baseType()->storageBytes() < 32)
- ArrayUtils(_context).clearStorageLoop(IntegerType(256));
+ ArrayUtils(_context).clearStorageLoop(*make_shared<IntegerType>(256));
else
ArrayUtils(_context).clearStorageLoop(*_type.baseType());