Replace libchrome size() with C++ standard ones
This change is for partially replacing <base/stl_util.h>'s base::size()
with std::size() in the C++ standard.
Also remove #include <base/stl_util.h>.
Test: build
Bug: 360917504
Change-Id: I09dbec56cda00c00f195875395461676bd55287a
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index b8d11f5..2e5a520 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -83,7 +83,7 @@
LibcurlHttpFetcher* fetcher = static_cast<LibcurlHttpFetcher*>(clientp);
// Stop watching the socket before closing it.
- for (size_t t = 0; t < base::size(fetcher->fd_controller_maps_); ++t) {
+ for (size_t t = 0; t < std::size(fetcher->fd_controller_maps_); ++t) {
fetcher->fd_controller_maps_[t].erase(item);
}
@@ -683,7 +683,7 @@
// We should iterate through all file descriptors up to libcurl's fd_max or
// the highest one we're tracking, whichever is larger.
- for (size_t t = 0; t < base::size(fd_controller_maps_); ++t) {
+ for (size_t t = 0; t < std::size(fd_controller_maps_); ++t) {
if (!fd_controller_maps_[t].empty())
fd_max = max(fd_max, fd_controller_maps_[t].rbegin()->first);
}
@@ -701,7 +701,7 @@
is_exc || (FD_ISSET(fd, &fd_write) != 0) // track 1 -- write
};
- for (size_t t = 0; t < base::size(fd_controller_maps_); ++t) {
+ for (size_t t = 0; t < std::size(fd_controller_maps_); ++t) {
bool tracked =
fd_controller_maps_[t].find(fd) != fd_controller_maps_[t].end();
@@ -782,7 +782,7 @@
MessageLoop::current()->CancelTask(timeout_id_);
timeout_id_ = MessageLoop::kTaskIdNull;
- for (size_t t = 0; t < base::size(fd_controller_maps_); ++t) {
+ for (size_t t = 0; t < std::size(fd_controller_maps_); ++t) {
fd_controller_maps_[t].clear();
}