refactor: prefer std::ranges over begin() and end() (#43464)

This commit is contained in:
Charles Kerr 2024-08-26 09:58:32 -05:00 committed by GitHub
parent 56829f75c1
commit 2390706030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 30 additions and 40 deletions

View file

@ -85,7 +85,7 @@ void WindowList::CloseAllWindows() {
std::vector<base::WeakPtr<NativeWindow>> weak_windows =
ConvertToWeakPtrVector(GetInstance()->windows_);
#if BUILDFLAG(IS_MAC)
std::reverse(weak_windows.begin(), weak_windows.end());
std::ranges::reverse(weak_windows);
#endif
for (const auto& window : weak_windows) {
if (window && !window->IsClosed())