mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Modernize std::max_element
with ranges
This commit is contained in:
@ -146,7 +146,7 @@ void ToolBar::MakeActions()
|
||||
std::ranges::transform(items, std::back_inserter(widths),
|
||||
[](QWidget* item) { return item->sizeHint().width(); });
|
||||
|
||||
const int min_width = *std::max_element(widths.begin(), widths.end()) * 0.85;
|
||||
const int min_width = *std::ranges::max_element(widths) * 0.85;
|
||||
for (QWidget* widget : items)
|
||||
widget->setMinimumWidth(min_width);
|
||||
}
|
||||
|
Reference in New Issue
Block a user