|
20 | 20 | #include <cmath> |
21 | 21 | #include <chrono> |
22 | 22 | #include <regex> |
23 | | -#include <algorithm> |
24 | 23 |
|
25 | 24 | using namespace o2::conf; |
26 | 25 | namespace bpo = boost::program_options; |
@@ -197,7 +196,11 @@ bool SimConfig::determineActiveModulesList(const std::string& version, std::vect |
197 | 196 | // check if specified modules are in list |
198 | 197 | if (inputargs.size() != 1 || inputargs[0] != "all") { |
199 | 198 | std::vector<std::string> diff; |
200 | | - std::set_difference(inputargs.begin(), inputargs.end(), modules.begin(), modules.end(), std::back_inserter(diff)); |
| 199 | + for (const auto& in : inputargs) { |
| 200 | + if (std::find(modules.begin(), modules.end(), in) == std::end(modules)) { |
| 201 | + diff.emplace_back(in); |
| 202 | + } |
| 203 | + } |
201 | 204 | if (!diff.empty()) { |
202 | 205 | LOGP(error, "Modules specified that are not present in detector list {}", version); |
203 | 206 | for (int j{0}; const auto& m : diff) { |
@@ -423,7 +426,11 @@ bool SimConfig::filterSkippedElements(std::vector<std::string>& elements, std::v |
423 | 426 | LOGP(error, " + {: <2}. {}", j++, m); |
424 | 427 | } |
425 | 428 | std::vector<std::string> diff; |
426 | | - std::set_difference(skipped.begin(), skipped.end(), elements.begin(), elements.end(), std::back_inserter(diff)); |
| 429 | + for (const auto& skip : skipped) { |
| 430 | + if (std::find(elements.begin(), elements.end(), skip) == std::end(elements)) { |
| 431 | + diff.emplace_back(skip); |
| 432 | + } |
| 433 | + } |
427 | 434 | LOGP(error, "Specified skipped modules not present in built modules:"); |
428 | 435 | for (int j{0}; const auto& m : diff) { |
429 | 436 | LOGP(error, " - {: <2}. {}", j++, m); |
|
0 commit comments