mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #13131 from rodrigobaraglia/develop
replace boost::range::for_each with range::views:zip + loop in file ContractABIUtils.cpp
This commit is contained in:
commit
72f1907298
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/assign/list_of.hpp>
|
#include <boost/assign/list_of.hpp>
|
||||||
#include <boost/range/algorithm_ext/for_each.hpp>
|
#include <range/v3/view/zip.hpp>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -281,26 +281,16 @@ void ContractABIUtils::overwriteParameters(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
using namespace placeholders;
|
using namespace placeholders;
|
||||||
boost::for_each(
|
for (auto&& [source, target]: ranges::views::zip(_sourceParameters, _targetParameters))
|
||||||
_sourceParameters,
|
if (
|
||||||
_targetParameters,
|
source.abiType.size != target.abiType.size ||
|
||||||
std::bind<void>(
|
source.abiType.type != target.abiType.type ||
|
||||||
[&](Parameter _a, Parameter& _b) -> void
|
source.abiType.fractionalDigits != target.abiType.fractionalDigits
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (
|
_errorReporter.warning("Type or size of parameter(s) does not match.");
|
||||||
_a.abiType.size != _b.abiType.size ||
|
target = source;
|
||||||
_a.abiType.type != _b.abiType.type ||
|
}
|
||||||
_a.abiType.fractionalDigits != _b.abiType.fractionalDigits
|
|
||||||
)
|
|
||||||
{
|
|
||||||
_errorReporter.warning("Type or size of parameter(s) does not match.");
|
|
||||||
_b = _a;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_1,
|
|
||||||
_2
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
solidity::frontend::test::ParameterList ContractABIUtils::preferredParameters(
|
solidity::frontend::test::ParameterList ContractABIUtils::preferredParameters(
|
||||||
|
Loading…
Reference in New Issue
Block a user