aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerUtils.cpp
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-08-08 00:44:51 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-08-08 00:51:53 +0800
commitb11e39e25ee14b2d56db86ea48e3229a7a6cad52 (patch)
treef818c974e2cfaf35a1667573837e50bd6f312022 /libsolidity/codegen/CompilerUtils.cpp
parentd7756322c07634fa2ca0649a33585fc167079786 (diff)
downloaddexon-solidity-b11e39e25ee14b2d56db86ea48e3229a7a6cad52.tar.gz
dexon-solidity-b11e39e25ee14b2d56db86ea48e3229a7a6cad52.tar.zst
dexon-solidity-b11e39e25ee14b2d56db86ea48e3229a7a6cad52.zip
Remove remaining instances of ``fillRight`` left over from tuple wildcards assignments.
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.cpp')
-rw-r--r--libsolidity/codegen/CompilerUtils.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp
index bd3ec8f5..b30851fb 100644
--- a/libsolidity/codegen/CompilerUtils.cpp
+++ b/libsolidity/codegen/CompilerUtils.cpp
@@ -947,20 +947,12 @@ void CompilerUtils::convertType(
{
TupleType const& sourceTuple = dynamic_cast<TupleType const&>(_typeOnStack);
TupleType const& targetTuple = dynamic_cast<TupleType const&>(_targetType);
- // fillRight: remove excess values at right side, !fillRight: remove eccess values at left side
- bool fillRight = !targetTuple.components().empty() && (
- !targetTuple.components().back() ||
- targetTuple.components().front()
- );
+ solAssert(targetTuple.components().size() == sourceTuple.components().size(), "");
unsigned depth = sourceTuple.sizeOnStack();
for (size_t i = 0; i < sourceTuple.components().size(); ++i)
{
TypePointer sourceType = sourceTuple.components()[i];
- TypePointer targetType;
- if (fillRight && i < targetTuple.components().size())
- targetType = targetTuple.components()[i];
- else if (!fillRight && targetTuple.components().size() + i >= sourceTuple.components().size())
- targetType = targetTuple.components()[targetTuple.components().size() - (sourceTuple.components().size() - i)];
+ TypePointer targetType = targetTuple.components()[i];
if (!sourceType)
{
solAssert(!targetType, "");