mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 06:13:14 -07:00
find_if to any_of
This commit is contained in:
parent
1a2139f979
commit
322ce34dd1
1 changed files with 6 additions and 5 deletions
|
@ -312,11 +312,12 @@ bool NavCategory::IsConverterViewMode(ViewMode mode)
|
|||
|
||||
bool NavCategory::IsModeInCategoryGroup(ViewMode mode, CategoryGroupType type)
|
||||
{
|
||||
auto iter = find_if(begin(s_categoryManifest), end(s_categoryManifest), [mode, type](const NavCategoryInitializer& initializer) {
|
||||
return std::any_of(
|
||||
s_categoryManifest.cbegin(),
|
||||
s_categoryManifest.cend(),
|
||||
[mode, type](const auto& initializer) {
|
||||
return initializer.viewMode == mode && initializer.groupType == type;
|
||||
});
|
||||
|
||||
return iter != s_categoryManifest.end();
|
||||
}
|
||||
|
||||
NavCategoryGroup::NavCategoryGroup(const NavCategoryGroupInitializer& groupInitializer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue