aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-23 05:05:36 +0800
committerGitHub <noreply@github.com>2018-11-23 05:05:36 +0800
commit9217fbb58d085325ce37ed6ca37f76e8b8de9d90 (patch)
tree8a79e1e251509133eac2bf73a84a38a640579a0a /libsolidity
parentc095440fb7fa48487a0078fddbd691734e098921 (diff)
parentd686807153dd85471bac9d426c494601397b0ab4 (diff)
downloaddexon-solidity-9217fbb58d085325ce37ed6ca37f76e8b8de9d90.tar
dexon-solidity-9217fbb58d085325ce37ed6ca37f76e8b8de9d90.tar.gz
dexon-solidity-9217fbb58d085325ce37ed6ca37f76e8b8de9d90.tar.bz2
dexon-solidity-9217fbb58d085325ce37ed6ca37f76e8b8de9d90.tar.lz
dexon-solidity-9217fbb58d085325ce37ed6ca37f76e8b8de9d90.tar.xz
dexon-solidity-9217fbb58d085325ce37ed6ca37f76e8b8de9d90.tar.zst
dexon-solidity-9217fbb58d085325ce37ed6ca37f76e8b8de9d90.zip
Merge pull request #5489 from ethereum/chriseth-patch-1
Style
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/formal/SolverInterface.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/libsolidity/formal/SolverInterface.h b/libsolidity/formal/SolverInterface.h
index 17e6904c..fd1abd61 100644
--- a/libsolidity/formal/SolverInterface.h
+++ b/libsolidity/formal/SolverInterface.h
@@ -55,8 +55,9 @@ struct Sort
Sort(Kind _kind):
kind(_kind) {}
virtual ~Sort() = default;
- Kind const kind;
bool operator==(Sort const& _other) const { return kind == _other.kind; }
+
+ Kind const kind;
};
using SortPointer = std::shared_ptr<Sort>;
@@ -64,8 +65,6 @@ struct FunctionSort: public Sort
{
FunctionSort(std::vector<SortPointer> _domain, SortPointer _codomain):
Sort(Kind::Function), domain(std::move(_domain)), codomain(std::move(_codomain)) {}
- std::vector<SortPointer> domain;
- SortPointer codomain;
bool operator==(FunctionSort const& _other) const
{
if (!std::equal(
@@ -73,11 +72,13 @@ struct FunctionSort: public Sort
domain.end(),
_other.domain.begin(),
[&](SortPointer _a, SortPointer _b) { return *_a == *_b; }
- )
- )
+ ))
return false;
return Sort::operator==(_other) && *codomain == *_other.codomain;
}
+
+ std::vector<SortPointer> domain;
+ SortPointer codomain;
};
struct ArraySort: public Sort
@@ -86,12 +87,13 @@ struct ArraySort: public Sort
/// _range is the sort of the values
ArraySort(SortPointer _domain, SortPointer _range):
Sort(Kind::Array), domain(std::move(_domain)), range(std::move(_range)) {}
- SortPointer domain;
- SortPointer range;
bool operator==(ArraySort const& _other) const
{
return Sort::operator==(_other) && *domain == *_other.domain && *range == *_other.range;
}
+
+ SortPointer domain;
+ SortPointer range;
};
/// C++ representation of an SMTLIB2 expression.