Remove handling for comma-separated specifications of targets to remove
This commit is contained in:
parent
52edf572d4
commit
34282ebbe9
|
@ -497,18 +497,11 @@ void setTagInfo(const SetTagInfoArgs &args)
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine targets to remove
|
// determine targets to remove
|
||||||
vector<TagTarget> targetsToRemove;
|
auto targetsToRemove = std::vector<TagTarget>();
|
||||||
bool validRemoveTargetsSpecified = false;
|
|
||||||
for (size_t i = 0, max = args.removeTargetArg.occurrences(); i != max; ++i) {
|
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)) {
|
for (const auto &targetDenotation : args.removeTargetArg.values(i)) {
|
||||||
targetsToRemove.emplace_back();
|
if (!applyTargetConfiguration(target, targetDenotation)) {
|
||||||
if (!strcmp(targetDenotation, ",")) {
|
|
||||||
if (validRemoveTargetsSpecified) {
|
|
||||||
targetsToRemove.emplace_back();
|
|
||||||
}
|
|
||||||
} else if (applyTargetConfiguration(targetsToRemove.back(), targetDenotation)) {
|
|
||||||
validRemoveTargetsSpecified = true;
|
|
||||||
} else {
|
|
||||||
cerr << Phrases::Error << "The given target specification \"" << targetDenotation << "\" is invalid." << Phrases::EndFlush;
|
cerr << Phrases::Error << "The given target specification \"" << targetDenotation << "\" is invalid." << Phrases::EndFlush;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue