forked from OSchip/llvm-project
[Support] Use is_contained (NFC)
This commit is contained in:
parent
bc633fe46b
commit
ef1cf345bb
|
@ -464,7 +464,7 @@ void Option::addCategory(OptionCategory &C) {
|
|||
// must be explicitly added if you want multiple categories that include it.
|
||||
if (&C != &GeneralCategory && Categories[0] == &GeneralCategory)
|
||||
Categories[0] = &C;
|
||||
else if (find(Categories, &C) == Categories.end())
|
||||
else if (!is_contained(Categories, &C))
|
||||
Categories.push_back(&C);
|
||||
}
|
||||
|
||||
|
@ -2590,7 +2590,7 @@ void cl::HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories,
|
|||
SubCommand &Sub) {
|
||||
for (auto &I : Sub.OptionsMap) {
|
||||
for (auto &Cat : I.second->Categories) {
|
||||
if (find(Categories, Cat) == Categories.end() && Cat != &GenericCategory)
|
||||
if (!is_contained(Categories, Cat) && Cat != &GenericCategory)
|
||||
I.second->setHiddenFlag(cl::ReallyHidden);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue