Merge pull request #8892 from ethereum/boost-cxx11

Replace boost/algorithm/cxx11 with C++11 features
This commit is contained in:
chriseth
2020-05-11 16:29:42 +02:00
committed by GitHub
8 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -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;
+3 -4
View File
@@ -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); }
))
{