From 82a00e7dc50a8d8828fa6c192f78d4147944eccf Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 20 Jan 2017 14:30:02 +0100 Subject: Use shared_ptrs to enable shared_from_this. --- libsolidity/codegen/ArrayUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libsolidity/codegen') 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(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(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(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(256)); else ArrayUtils(_context).clearStorageLoop(*_type.baseType()); -- cgit