Use std::any_of
This commit is contained in:
parent
65089ae5ae
commit
da287b7bb7
2 changed files with 6 additions and 9 deletions
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
|
|
||||||
#include <boost/algorithm/cxx11/any_of.hpp>
|
|
||||||
#include <boost/iterator/transform_iterator.hpp>
|
#include <boost/iterator/transform_iterator.hpp>
|
||||||
|
|
||||||
#include <boost/range/algorithm/for_each.hpp>
|
#include <boost/range/algorithm/for_each.hpp>
|
||||||
|
@ -50,8 +49,7 @@
|
||||||
|
|
||||||
// STD includes
|
// STD includes
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <algorithm>
|
||||||
namespace ba = boost::algorithm;
|
|
||||||
|
|
||||||
//************************************************************************
|
//************************************************************************
|
||||||
// Local namespace structures
|
// Local namespace structures
|
||||||
|
@ -493,7 +491,7 @@ QString OverwriteDialog::acceptResolution(void *obj_, int resolution,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool existsResource(const TFilePath &dstDir, const Resource &rsrc) {
|
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));
|
boost::bind(existsComponent, boost::cref(dstDir), _1));
|
||||||
}
|
}
|
||||||
}; // locals
|
}; // locals
|
||||||
|
@ -547,7 +545,7 @@ int IoCmd::loadResourceFolders(LoadResourceArguments &args,
|
||||||
// Deal with import decision
|
// Deal with import decision
|
||||||
bool import = false;
|
bool import = false;
|
||||||
{
|
{
|
||||||
if (ba::any_of(
|
if (std::any_of(
|
||||||
args.resourceDatas.begin(), args.resourceDatas.end(),
|
args.resourceDatas.begin(), args.resourceDatas.end(),
|
||||||
boost::bind(locals::isExternPath, boost::cref(*scene), _1))) {
|
boost::bind(locals::isExternPath, boost::cref(*scene), _1))) {
|
||||||
// Ask for data import in this case
|
// Ask for data import in this case
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
|
||||||
// boost includes
|
#include <algorithm>
|
||||||
#include <boost/algorithm/cxx11/any_of.hpp>
|
|
||||||
|
|
||||||
using namespace DVGui;
|
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
|
// Inform the user that case 2 will not produce an undo if a raster-based
|
||||||
// level is detected
|
// 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);
|
std::vector<QString> buttons(2);
|
||||||
buttons[0] = QObject::tr("Ok"), buttons[1] = QObject::tr("Cancel");
|
buttons[0] = QObject::tr("Ok"), buttons[1] = QObject::tr("Cancel");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue