Title: [246826] trunk/Source/WTF
- Revision
- 246826
- Author
- [email protected]
- Date
- 2019-06-25 19:00:47 -0700 (Tue, 25 Jun 2019)
Log Message
Experiment with simple structured bindings use
https://bugs.webkit.org/show_bug.cgi?id=198905
Reviewed by Darin Adler.
* wtf/URLHelpers.cpp:
(WTF::URLHelpers::mapHostNames):
Simplify code using c++ structured bindings (https://en.cppreference.com/w/cpp/language/structured_binding)
to see if all the platforms will work with it.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (246825 => 246826)
--- trunk/Source/WTF/ChangeLog 2019-06-26 01:44:53 UTC (rev 246825)
+++ trunk/Source/WTF/ChangeLog 2019-06-26 02:00:47 UTC (rev 246826)
@@ -1,3 +1,15 @@
+2019-06-25 Sam Weinig <[email protected]>
+
+ Experiment with simple structured bindings use
+ https://bugs.webkit.org/show_bug.cgi?id=198905
+
+ Reviewed by Darin Adler.
+
+ * wtf/URLHelpers.cpp:
+ (WTF::URLHelpers::mapHostNames):
+ Simplify code using c++ structured bindings (https://en.cppreference.com/w/cpp/language/structured_binding)
+ to see if all the platforms will work with it.
+
2019-06-25 Adam Barth <[email protected]>
[fuchsia] Update to newer zx_clock_get syscall
Modified: trunk/Source/WTF/wtf/URLHelpers.cpp (246825 => 246826)
--- trunk/Source/WTF/wtf/URLHelpers.cpp 2019-06-26 01:44:53 UTC (rev 246825)
+++ trunk/Source/WTF/wtf/URLHelpers.cpp 2019-06-26 02:00:47 UTC (rev 246826)
@@ -729,9 +729,7 @@
// Do the mapping.
String result = string;
while (!hostNameRanges->isEmpty()) {
- unsigned location, length;
- String mappedHostName;
- std::tie(location, length, mappedHostName) = hostNameRanges->takeLast();
+ auto [location, length, mappedHostName] = hostNameRanges->takeLast();
result = result.replace(location, length, mappedHostName);
}
return result;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes