aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ArrayUtils.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-20 21:30:02 +0800
committerchriseth <c@ethdev.com>2017-01-24 19:06:41 +0800
commit82a00e7dc50a8d8828fa6c192f78d4147944eccf (patch)
tree6c43ed537bb3edcd4a96d4ba4fc072fd95a0c6b3 /libsolidity/codegen/ArrayUtils.cpp
parentcea020b89e6f5bf20e27d7059ad27392e8526e9b (diff)
downloaddexon-solidity-82a00e7dc50a8d8828fa6c192f78d4147944eccf.tar.gz
dexon-solidity-82a00e7dc50a8d8828fa6c192f78d4147944eccf.tar.zst
dexon-solidity-82a00e7dc50a8d8828fa6c192f78d4147944eccf.zip
Use shared_ptrs to enable shared_from_this.
Diffstat (limited to 'libsolidity/codegen/ArrayUtils.cpp')
-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());