Use std::any_of

This commit is contained in:
Tact Yoshida 2018-12-20 21:33:06 +09:00
parent 65089ae5ae
commit da287b7bb7
2 changed files with 6 additions and 9 deletions

View file

@ -37,7 +37,6 @@
#include <boost/bind.hpp>
#include <boost/algorithm/cxx11/any_of.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/range/algorithm/for_each.hpp>
@ -50,8 +49,7 @@
// STD includes
#include <set>
namespace ba = boost::algorithm;
#include <algorithm>
//************************************************************************
// Local namespace structures
@ -493,7 +491,7 @@ QString OverwriteDialog::acceptResolution(void *obj_, int resolution,
}
static bool existsResource(const TFilePath &dstDir, const Resource &rsrc) {
return ba::any_of(rsrc.m_components.begin(), rsrc.m_components.end(),
return std::any_of(rsrc.m_components.begin(), rsrc.m_components.end(),
boost::bind(existsComponent, boost::cref(dstDir), _1));
}
}; // locals
@ -547,7 +545,7 @@ int IoCmd::loadResourceFolders(LoadResourceArguments &args,
// Deal with import decision
bool import = false;
{
if (ba::any_of(
if (std::any_of(
args.resourceDatas.begin(), args.resourceDatas.end(),
boost::bind(locals::isExternPath, boost::cref(*scene), _1))) {
// Ask for data import in this case

View file

@ -28,8 +28,7 @@
#include <QDesktopWidget>
#include <QCheckBox>
// boost includes
#include <boost/algorithm/cxx11/any_of.hpp>
#include <algorithm>
using namespace DVGui;
@ -1433,7 +1432,7 @@ int DVGui::eraseStylesInDemand(TPalette *palette, std::vector<int> styleIds,
// Inform the user that case 2 will not produce an undo if a raster-based
// level is detected
if (boost::algorithm::any_of(levels, locals::isRasterLevel)) {
if (std::any_of(levels.begin(), levels.end(), locals::isRasterLevel)) {
std::vector<QString> buttons(2);
buttons[0] = QObject::tr("Ok"), buttons[1] = QObject::tr("Cancel");