From 34282ebbe9d864829adbf246b3d360eaa0cd96c2 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 31 Dec 2021 00:35:42 +0100 Subject: [PATCH] Remove handling for comma-separated specifications of targets to remove --- cli/mainfeatures.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cli/mainfeatures.cpp b/cli/mainfeatures.cpp index caa60bd..19bcd6d 100644 --- a/cli/mainfeatures.cpp +++ b/cli/mainfeatures.cpp @@ -497,18 +497,11 @@ void setTagInfo(const SetTagInfoArgs &args) } // determine targets to remove - vector targetsToRemove; - bool validRemoveTargetsSpecified = false; + auto targetsToRemove = std::vector(); for (size_t i = 0, max = args.removeTargetArg.occurrences(); i != max; ++i) { + auto &target = targetsToRemove.emplace_back(); for (const auto &targetDenotation : args.removeTargetArg.values(i)) { - targetsToRemove.emplace_back(); - if (!strcmp(targetDenotation, ",")) { - if (validRemoveTargetsSpecified) { - targetsToRemove.emplace_back(); - } - } else if (applyTargetConfiguration(targetsToRemove.back(), targetDenotation)) { - validRemoveTargetsSpecified = true; - } else { + if (!applyTargetConfiguration(target, targetDenotation)) { cerr << Phrases::Error << "The given target specification \"" << targetDenotation << "\" is invalid." << Phrases::EndFlush; exit(-1); }