[Win][Clang] InspectorNetworkAgent.cpp(1122,20): error: cannot decompose this type...
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Sep 2019 06:02:53 +0000 (06:02 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Sep 2019 06:02:53 +0000 (06:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201489

Unreviewed build fix for clang-cl.

clang-cl 8 can't use a structured binding for a const struct.

No behavior change.

* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::interceptWithResponse): Not to use a structured binding for a const struct.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp

index ca12583..1f13470 100644 (file)
@@ -1,3 +1,17 @@
+2019-09-04  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Win][Clang] InspectorNetworkAgent.cpp(1122,20): error: cannot decompose this type; 'std::tuple_size<const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WTF::JSONImpl::Value, WTF::DumbPtrTraits<WTF::JSONImpl::Value> > >>::value' is not a valid integral const
+        https://bugs.webkit.org/show_bug.cgi?id=201489
+
+        Unreviewed build fix for clang-cl.
+
+        clang-cl 8 can't use a structured binding for a const struct.
+
+        No behavior change.
+
+        * inspector/agents/InspectorNetworkAgent.cpp:
+        (WebCore::InspectorNetworkAgent::interceptWithResponse): Not to use a structured binding for a const struct.
+
 2019-09-04  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, another build fix after r249501.
index ca664e9..6aab3b2 100644 (file)
@@ -1119,10 +1119,10 @@ void InspectorNetworkAgent::interceptWithResponse(ErrorString& errorString, cons
         overrideResponse.setMimeType(*mimeType);
     if (headers) {
         HTTPHeaderMap explicitHeaders;
-        for (auto& [key, value] : *headers) {
+        for (auto& header : *headers) {
             String headerValue;
-            if (value->asString(headerValue))
-                explicitHeaders.add(key, headerValue);
+            if (header.value->asString(headerValue))
+                explicitHeaders.add(header.key, headerValue);
         }
         overrideResponse.setHTTPHeaderFields(WTFMove(explicitHeaders));
         overrideResponse.setHTTPHeaderField(HTTPHeaderName::ContentType, overrideResponse.mimeType());