diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-04 21:32:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-07 23:27:56 +0100 |
| commit | a5d004b0773f633401528392fc28e66d70e13ac8 (patch) | |
| tree | 9f83ff2ab353f5a63918210d4930d0ead228375e /src/lib/cross_osx.cc | |
| parent | dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 (diff) | |
BOOST_FOREACH.
Diffstat (limited to 'src/lib/cross_osx.cc')
| -rw-r--r-- | src/lib/cross_osx.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index 76c451a6f..8b60ff492 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -31,7 +31,6 @@ extern "C" { #include <libavformat/avio.h> } #include <boost/algorithm/string.hpp> -#include <boost/foreach.hpp> #include <boost/regex.hpp> #if BOOST_VERSION >= 106100 #include <boost/dll/runtime_symbol_info.hpp> @@ -331,7 +330,7 @@ analyse_media_path (CFDictionaryRef& description) vector<string> bits; split(bits, path, boost::is_any_of("/")); - BOOST_FOREACH (string i, bits) { + for (auto i: bits) { if (starts_with(i, "PRT")) { mp.prt = i; } @@ -468,11 +467,11 @@ Drive::get () CFRelease(session); /* Mark disks containing mounted partitions as themselves mounted */ - BOOST_FOREACH (Disk& i, disks) { + for (auto& i: disks) { if (!i.whole) { continue; } - BOOST_FOREACH (Disk& j, disks) { + for (auto& j: disks) { if (!j.mount_points.empty() && starts_with(j.mount_point, i.mount_point)) { LOG_DISK("Marking %1 as mounted because %2 is", i.mount_point, j.mount_point); std::copy(j.mount_points.begin(), j.mount_points.end(), back_inserter(i.mount_points)); @@ -482,7 +481,7 @@ Drive::get () /* Make a map of the PRT codes and mount points of mounted, synthesized disks */ map<string, vector<boost::filesystem::path> > mounted_synths; - BOOST_FOREACH (Disk& i, disks) { + for (auto& i: disks) { if (!i.real && !i.mount_points.empty()) { LOG_DISK("Found a mounted synth %1 with %2", i.mount_point, i.prt); mounted_synths[i.prt] = i.mount_points; @@ -490,7 +489,7 @@ Drive::get () } /* Mark containers of those mounted synths as themselves mounted */ - BOOST_FOREACH (Disk& i, disks) { + for (auto& i: disks) { if (i.real) { map<string, vector<boost::filesystem::path> >::const_iterator j = mounted_synths.find(i.prt); if (j != mounted_synths.end()) { @@ -501,7 +500,7 @@ Drive::get () } vector<Drive> drives; - BOOST_FOREACH (Disk& i, disks) { + for (auto& i: disks) { if (i.whole) { /* A whole disk that is not a container for a mounted synth */ drives.push_back(Drive(i.mount_point, i.mount_points, i.size, i.vendor, i.model)); |
