Replaced boost remove_erase and remove_erase_if

This commit is contained in:
anurag4u80
2021-04-24 08:10:41 +05:30
parent f162c484ca
commit c4cf412fed
8 changed files with 14 additions and 18 deletions
+3 -3
View File
@@ -25,7 +25,7 @@
#include <libsolutil/CommonData.h>
#include <libsolutil/Visitor.h>
#include <boost/range/algorithm_ext/erase.hpp>
#include <range/v3/action/remove_if.hpp>
using namespace std;
using namespace solidity;
@@ -52,7 +52,7 @@ ExpressionStatement makeDiscardCall(
void removeEmptyDefaultFromSwitch(Switch& _switchStmt)
{
boost::remove_erase_if(
ranges::actions::remove_if(
_switchStmt.cases,
[](Case const& _case) { return !_case.value && _case.body.statements.empty(); }
);
@@ -69,7 +69,7 @@ void removeEmptyCasesFromSwitch(Switch& _switchStmt)
if (hasDefault)
return;
boost::remove_erase_if(
ranges::actions::remove_if(
_switchStmt.cases,
[](Case const& _case) { return _case.body.statements.empty(); }
);