mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Modernize std::transform
with ranges
In StringUtil.h, the lambdas wrapping `Common::ToLower(char)` and `Common::ToUpper(char)` were only necessary due to the function names being overloaded.
This commit is contained in:
@ -143,8 +143,8 @@ void ToolBar::MakeActions()
|
||||
}
|
||||
|
||||
std::vector<int> widths;
|
||||
std::transform(items.begin(), items.end(), std::back_inserter(widths),
|
||||
[](QWidget* item) { return item->sizeHint().width(); });
|
||||
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;
|
||||
for (QWidget* widget : items)
|
||||
|
Reference in New Issue
Block a user