mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8892 from ethereum/boost-cxx11
Replace boost/algorithm/cxx11 with C++11 features
This commit is contained in:
@@ -38,9 +38,6 @@ using namespace solidity;
|
||||
using namespace solidity::yul;
|
||||
using namespace solidity::util;
|
||||
|
||||
using boost::split;
|
||||
using boost::is_any_of;
|
||||
|
||||
string solidity::yul::reindent(string const& _code)
|
||||
{
|
||||
int constexpr indentationWidth = 4;
|
||||
@@ -55,7 +52,7 @@ string solidity::yul::reindent(string const& _code)
|
||||
};
|
||||
|
||||
vector<string> lines;
|
||||
split(lines, _code, is_any_of("\n"));
|
||||
boost::split(lines, _code, boost::is_any_of("\n"));
|
||||
for (string& line: lines)
|
||||
boost::trim(line);
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <libsolutil/Visitor.h>
|
||||
|
||||
#include <boost/range/algorithm_ext/erase.hpp>
|
||||
#include <boost/algorithm/cxx11/any_of.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
@@ -60,8 +59,9 @@ void removeEmptyDefaultFromSwitch(Switch& _switchStmt)
|
||||
|
||||
void removeEmptyCasesFromSwitch(Switch& _switchStmt)
|
||||
{
|
||||
bool hasDefault = boost::algorithm::any_of(
|
||||
_switchStmt.cases,
|
||||
bool hasDefault = std::any_of(
|
||||
_switchStmt.cases.begin(),
|
||||
_switchStmt.cases.end(),
|
||||
[](Case const& _case) { return !_case.value; }
|
||||
);
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <libsolutil/Visitor.h>
|
||||
|
||||
#include <boost/range/algorithm_ext/erase.hpp>
|
||||
#include <boost/algorithm/cxx11/any_of.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
#include <libyul/Dialect.h>
|
||||
#include <libyul/SideEffects.h>
|
||||
|
||||
#include <boost/algorithm/cxx11/none_of.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
using namespace solidity::yul;
|
||||
@@ -85,8 +83,9 @@ void UnusedPruner::operator()(Block& _block)
|
||||
// movable or it returns a single value. In the latter case, we
|
||||
// replace `let a := f()` by `pop(f())` (in pure Yul, this will be
|
||||
// `drop(f())`).
|
||||
if (boost::algorithm::none_of(
|
||||
varDecl.variables,
|
||||
if (std::none_of(
|
||||
varDecl.variables.begin(),
|
||||
varDecl.variables.end(),
|
||||
[=](TypedName const& _typedName) { return used(_typedName.name); }
|
||||
))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user