mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11272 from ethereum/replace-boost-with-rangev3-solgen
Remove most boost usages in Yul proto converter
This commit is contained in:
commit
e2120f1f2f
@ -23,11 +23,14 @@
|
||||
|
||||
#include <libsolutil/StringUtils.h>
|
||||
|
||||
#include <boost/algorithm/cxx11/all_of.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <range/v3/algorithm/all_of.hpp>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/range/algorithm_ext/erase.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity::yul::test::yul_fuzzer;
|
||||
using namespace solidity::yul::test;
|
||||
@ -1161,9 +1164,10 @@ void ProtoConverter::visit(CaseStmt const& _x)
|
||||
// Ensure that all characters in the string literal except the first
|
||||
// and the last (double quote characters) are alphanumeric.
|
||||
yulAssert(
|
||||
boost::algorithm::all_of(literal.begin() + 1, literal.end() - 2, [=](char c) -> bool {
|
||||
return std::isalpha(c) || std::isdigit(c);
|
||||
}),
|
||||
ranges::all_of(
|
||||
literal.begin() + 1,
|
||||
literal.end() - 2,
|
||||
[=](char c) { return isalpha(c) || isdigit(c); }),
|
||||
"Proto fuzzer: Invalid string literal encountered"
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user