mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replaced keys, values and reverse with ranges
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <range/v3/algorithm/for_each.hpp>
|
||||
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include <range/v3/view/reverse.hpp>
|
||||
|
||||
#ifdef HAVE_Z3_DLOPEN
|
||||
#include <z3_version.h>
|
||||
@@ -190,7 +190,7 @@ void CHC::endVisit(ContractDefinition const& _contract)
|
||||
}
|
||||
m_errorDest = nullptr;
|
||||
// Then call initializer_Base from base -> derived
|
||||
for (auto base: _contract.annotation().linearizedBaseContracts | boost::adaptors::reversed)
|
||||
for (auto base: _contract.annotation().linearizedBaseContracts | ranges::views::reverse)
|
||||
{
|
||||
errorFlag().increaseIndex();
|
||||
m_context.addAssertion(smt::constructorCall(*m_contractInitializers.at(&_contract).at(base), m_context));
|
||||
@@ -1737,7 +1737,7 @@ optional<string> CHC::generateCounterexample(CHCSolverInterface::CexGraph const&
|
||||
path.emplace_back(boost::algorithm::join(calls, "\n"));
|
||||
}
|
||||
|
||||
return localState + "\nTransaction trace:\n" + boost::algorithm::join(boost::adaptors::reverse(path), "\n");
|
||||
return localState + "\nTransaction trace:\n" + boost::algorithm::join(path | ranges::views::reverse, "\n");
|
||||
}
|
||||
|
||||
map<unsigned, vector<unsigned>> CHC::summaryCalls(CHCSolverInterface::CexGraph const& _graph, unsigned _root)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <range/v3/view.hpp>
|
||||
|
||||
#include <boost/range/adaptors.hpp>
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
|
||||
|
||||
#include <deque>
|
||||
|
||||
@@ -2499,7 +2499,7 @@ SecondarySourceLocation SMTEncoder::callStackMessage(vector<CallStackEntry> cons
|
||||
SecondarySourceLocation callStackLocation;
|
||||
solAssert(!_callStack.empty(), "");
|
||||
callStackLocation.append("Callstack:", SourceLocation());
|
||||
for (auto const& call: _callStack | boost::adaptors::reversed)
|
||||
for (auto const& call: _callStack | ranges::views::reverse)
|
||||
if (call.second)
|
||||
callStackLocation.append("", call.second->location());
|
||||
return callStackLocation;
|
||||
|
||||
Reference in New Issue
Block a user