From 5af5d38c2691ddead3efbcb75b1e65da51be6299 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Tue, 12 Dec 2017 13:29:50 +0100 Subject: [PATCH] Replace boost foreach and bind fixes #5821 --- plugins/check_disk.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/check_disk.cpp b/plugins/check_disk.cpp index 75835c8fd..f38d2cd64 100644 --- a/plugins/check_disk.cpp +++ b/plugins/check_disk.cpp @@ -20,11 +20,12 @@ #include #include #include -#include -#include +#include #include "check_disk.h" +using namespace std::placeholders; + #define VERSION 1.1 namespace po = boost::program_options; @@ -359,7 +360,7 @@ static INT check_drives(std::vector& vDrives, std::vector& if (debug) std::wcout << "Removing excluded drives\n"; - BOOST_FOREACH(const std::wstring wsDriveName, vExclude_Drives) + for (const std::wstring& wsDriveName : vExclude_Drives) { vDrives.erase(std::remove_if(vDrives.begin(), vDrives.end(), std::bind(checkName, _1, wsDriveName + L'\\')), vDrives.end()); @@ -379,7 +380,7 @@ static INT check_drives(std::vector& vDrives, printInfoStruct& printInfo) if (!printInfo.exclude_drives.empty()) { if (debug) std::wcout << "Removing excluded drives from user input drives\n"; - BOOST_FOREACH(std::wstring wsDrive, printInfo.exclude_drives) + for (std::wstring& wsDrive : printInfo.exclude_drives) { printInfo.drives.erase(std::remove(printInfo.drives.begin(), printInfo.drives.end(), wsDrive), printInfo.drives.end()); -- 2.49.0