Title: [188198] trunk/Source/WebKit2
Revision
188198
Author
[email protected]
Date
2015-08-09 15:20:36 -0700 (Sun, 09 Aug 2015)

Log Message

Follow-up nit fixes after r187691.
https://bugs.webkit.org/show_bug.cgi?id=128006

Reviewed by Gavin Barraclough.

Use modern for-loops instead of explicit iterators.

* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::shouldCoalesceChallenge):
(WebKit::AuthenticationManager::coalesceChallengesMatching):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (188197 => 188198)


--- trunk/Source/WebKit2/ChangeLog	2015-08-09 22:15:23 UTC (rev 188197)
+++ trunk/Source/WebKit2/ChangeLog	2015-08-09 22:20:36 UTC (rev 188198)
@@ -1,3 +1,16 @@
+2015-08-09  Chris Dumez  <[email protected]>
+
+        Follow-up nit fixes after r187691.
+        https://bugs.webkit.org/show_bug.cgi?id=128006
+
+        Reviewed by Gavin Barraclough.
+
+        Use modern for-loops instead of explicit iterators.
+
+        * Shared/Authentication/AuthenticationManager.cpp:
+        (WebKit::AuthenticationManager::shouldCoalesceChallenge):
+        (WebKit::AuthenticationManager::coalesceChallengesMatching):
+
 2015-08-07  Filip Pizlo  <[email protected]>
 
         Lightweight locks should be adaptive

Modified: trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp (188197 => 188198)


--- trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp	2015-08-09 22:15:23 UTC (rev 188197)
+++ trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp	2015-08-09 22:20:36 UTC (rev 188198)
@@ -84,9 +84,8 @@
     if (!canCoalesceChallenge(challenge))
         return false;
 
-    auto end =  m_challenges.end();
-    for (auto it = m_challenges.begin(); it != end; ++it) {
-        if (it->key != challengeID && ProtectionSpace::compare(challenge.protectionSpace(), it->value.protectionSpace()))
+    for (auto& item : m_challenges) {
+        if (item.key != challengeID && ProtectionSpace::compare(challenge.protectionSpace(), item.value.protectionSpace()))
             return true;
     }
     return false;
@@ -103,10 +102,9 @@
     if (!canCoalesceChallenge(challenge))
         return challengesToCoalesce;
 
-    auto end = m_challenges.end();
-    for (auto it = m_challenges.begin(); it != end; ++it) {
-        if (it->key != challengeID && ProtectionSpace::compare(challenge.protectionSpace(), it->value.protectionSpace()))
-            challengesToCoalesce.append(it->key);
+    for (auto& item : m_challenges) {
+        if (item.key != challengeID && ProtectionSpace::compare(challenge.protectionSpace(), item.value.protectionSpace()))
+            challengesToCoalesce.append(item.key);
     }
 
     return challengesToCoalesce;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to