Change variable types in BalsaHeaders::ParseTokenList(). QUICHE does not compile in Envoy on Windows after some recent C++20-related fixes. This motivated cl/504122725, but that did not fix the issue, because the C++20-only (begin iterator, count) constructor signature is not available, and an iterator cannot implicitly be converted to a pointer type on that platform. The current change reverts cl/504122725 and instead uses absl::string_view::data() which return absl::string_view::pointer_type instead of iterator_type. PiperOrigin-RevId: 505126369
diff --git a/quiche/balsa/balsa_headers.cc b/quiche/balsa/balsa_headers.cc index 7dfc344..80642c3 100644 --- a/quiche/balsa/balsa_headers.cc +++ b/quiche/balsa/balsa_headers.cc
@@ -179,8 +179,8 @@ if (header_value.empty()) { return; } - auto start = header_value.begin(); - auto end = header_value.end(); + const char* start = header_value.data(); + const char* end = header_value.data() + header_value.size(); while (true) { // Cast `*start` to unsigned char to make values above 127 rank as expected // on platforms with signed char, where such values are represented as @@ -194,7 +194,7 @@ } } // found. marked. - auto nws = start; + const char* nws = start; // search for next whitspace or separator char. while (*start != ',' && static_cast<unsigned char>(*start) > ' ') {