replace std::set_symmetric_difference with std::ranges::set_symmetric_difference where appropriate

the c++-20 constrained algorithm is safer and code is more readable
This commit is contained in:
Arne Morten Kvarving committed 2026-02-24 11:35:36 +01:00
1 parent f95847e8e7
commit bdcd3772a2
1 file changed
+2 -3
+2 -3
View File
@@ -219,9 +219,8 @@ void SimulatorSerializer::checkSerializedCmdLine(const std::string& current,
stored_strings = filter_strings(stored_strings);
std::vector<std::string> difference;
std::set_symmetric_difference(stored_strings.begin(), stored_strings.end(),
curr_strings.begin(), curr_strings.end(),
std::back_inserter(difference));
std::ranges::set_symmetric_difference(stored_strings, curr_strings,
std::back_inserter(difference));
if (!difference.empty()) {
std::vector<std::string> only_stored, only_curr;