mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Simplified ranges::find_if with ranges::any_of and ranges::none_of.
This commit is contained in:
@@ -480,10 +480,7 @@ void TopBar::createSelectionControls() {
|
||||
}
|
||||
|
||||
bool TopBar::computeCanDelete() const {
|
||||
return ranges::find_if(
|
||||
_selectedItems.list,
|
||||
[](const SelectedItem &item) { return !item.canDelete; }
|
||||
) == _selectedItems.list.end();
|
||||
return ranges::all_of(_selectedItems.list, &SelectedItem::canDelete);
|
||||
}
|
||||
|
||||
Ui::StringWithNumbers TopBar::generateSelectedText() const {
|
||||
|
Reference in New Issue
Block a user