mirror of https://github.com/Icinga/icinga2.git
parent
75def4b074
commit
5af5d38c26
|
@ -20,11 +20,12 @@
|
||||||
#include <Shlwapi.h>
|
#include <Shlwapi.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <boost/foreach.hpp>
|
#include <functional>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
|
|
||||||
#include "check_disk.h"
|
#include "check_disk.h"
|
||||||
|
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#define VERSION 1.1
|
#define VERSION 1.1
|
||||||
|
|
||||||
namespace po = boost::program_options;
|
namespace po = boost::program_options;
|
||||||
|
@ -359,7 +360,7 @@ static INT check_drives(std::vector<drive>& vDrives, std::vector<std::wstring>&
|
||||||
if (debug)
|
if (debug)
|
||||||
std::wcout << "Removing excluded drives\n";
|
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(),
|
vDrives.erase(std::remove_if(vDrives.begin(), vDrives.end(),
|
||||||
std::bind(checkName, _1, wsDriveName + L'\\')), vDrives.end());
|
std::bind(checkName, _1, wsDriveName + L'\\')), vDrives.end());
|
||||||
|
@ -379,7 +380,7 @@ static INT check_drives(std::vector<drive>& vDrives, printInfoStruct& printInfo)
|
||||||
if (!printInfo.exclude_drives.empty()) {
|
if (!printInfo.exclude_drives.empty()) {
|
||||||
if (debug)
|
if (debug)
|
||||||
std::wcout << "Removing excluded drives from user input drives\n";
|
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.erase(std::remove(printInfo.drives.begin(), printInfo.drives.end(), wsDrive),
|
||||||
printInfo.drives.end());
|
printInfo.drives.end());
|
||||||
|
|
Loading…
Reference in New Issue