refactor: prefer std::ranges over begin() and end() (#43464)
This commit is contained in:
parent
56829f75c1
commit
2390706030
11 changed files with 30 additions and 40 deletions
|
@ -409,15 +409,15 @@ void ClientFrameViewLinux::LayoutButtonsOnSide(
|
|||
frame_buttons = trailing_frame_buttons_;
|
||||
// We always lay buttons out going from the edge towards the center, but
|
||||
// they are given to us as left-to-right, so reverse them.
|
||||
std::reverse(frame_buttons.begin(), frame_buttons.end());
|
||||
std::ranges::reverse(frame_buttons);
|
||||
break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
for (views::FrameButton frame_button : frame_buttons) {
|
||||
auto* button = std::find_if(
|
||||
nav_buttons_.begin(), nav_buttons_.end(), [&](const NavButton& test) {
|
||||
auto* button =
|
||||
std::ranges::find_if(nav_buttons_, [&](const NavButton& test) {
|
||||
return test.type != skip_type && test.frame_button == frame_button;
|
||||
});
|
||||
CHECK(button != nav_buttons_.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue