aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhan M Rashedun-Naby <naby88@gmail.com>2018-06-15 02:19:36 +0800
committerKhan M Rashedun-Naby <naby88@gmail.com>2018-06-21 01:16:21 +0800
commita5f0caa17817bb165f28fc45380ed264725b1252 (patch)
treef653b9485ef8f569906341caf746bfe0b2d828f9
parentdc5cd3e1e7db933493fe1b0dc12e5ecdf2a50ed7 (diff)
downloaddexon-solidity-a5f0caa17817bb165f28fc45380ed264725b1252.tar.gz
dexon-solidity-a5f0caa17817bb165f28fc45380ed264725b1252.tar.zst
dexon-solidity-a5f0caa17817bb165f28fc45380ed264725b1252.zip
Simplification of typeSupportedByOldABIEncoder
-rw-r--r--libsolidity/analysis/TypeChecker.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 671e4030..c19ca76d 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -41,15 +41,13 @@ bool typeSupportedByOldABIEncoder(Type const& _type)
{
if (_type.dataStoredIn(DataLocation::Storage))
return true;
- else if (_type.category() == Type::Category::Struct)
+ if (_type.category() == Type::Category::Struct)
return false;
- else if (_type.category() == Type::Category::Array)
+ if (_type.category() == Type::Category::Array)
{
auto const& arrayType = dynamic_cast<ArrayType const&>(_type);
auto base = arrayType.baseType();
- if (!typeSupportedByOldABIEncoder(*base))
- return false;
- else if (base->category() == Type::Category::Array && base->isDynamicallySized())
+ if (!typeSupportedByOldABIEncoder(*base) || (base->category() == Type::Category::Array && base->isDynamicallySized()))
return false;
}
return true;