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:
@@ -21,9 +21,10 @@
|
||||
#include <libsolutil/StringUtils.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/range/adaptor/map.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
#include <range/v3/view/map.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity::frontend::test;
|
||||
|
||||
@@ -97,7 +98,7 @@ void TestCaseReader::ensureAllSettingsRead() const
|
||||
if (!m_unreadSettings.empty())
|
||||
BOOST_THROW_EXCEPTION(runtime_error(
|
||||
"Unknown setting(s): " +
|
||||
util::joinHumanReadable(m_unreadSettings | boost::adaptors::map_keys)
|
||||
util::joinHumanReadable(m_unreadSettings | ranges::views::keys)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,10 @@
|
||||
|
||||
#include <libsolutil/FixedHash.h>
|
||||
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include <boost/algorithm/cxx11/all_of.hpp>
|
||||
|
||||
#include <range/v3/view/reverse.hpp>
|
||||
|
||||
#include <ostream>
|
||||
#include <variant>
|
||||
|
||||
@@ -332,7 +333,7 @@ void ExpressionEvaluator::evaluateArgs(
|
||||
vector<u256> values;
|
||||
size_t i = 0;
|
||||
/// Function arguments are evaluated in reverse.
|
||||
for (auto const& expr: _expr | boost::adaptors::reversed)
|
||||
for (auto const& expr: _expr | ranges::views::reverse)
|
||||
{
|
||||
if (!_literalArguments || !_literalArguments->at(_expr.size() - i - 1))
|
||||
visit(expr);
|
||||
|
||||
Reference in New Issue
Block a user