Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: Source/core/clipboard/DataObject.cpp

Issue 796913002: Use C++11 range-based loop for core/clipboard, core/dom and core/testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/clipboard/DataObject.cpp
diff --git a/Source/core/clipboard/DataObject.cpp b/Source/core/clipboard/DataObject.cpp
index 7edeaec622a32f44b9aa247d61bd226c5ba91968..270192a5c837587c20c34659ecd6fd18c85d2fb1 100644
--- a/Source/core/clipboard/DataObject.cpp
+++ b/Source/core/clipboard/DataObject.cpp
@@ -49,10 +49,10 @@ PassRefPtrWillBeRawPtr<DataObject> DataObject::createFromPasteboard(PasteMode pa
ListHashSet<String> types;
for (size_t i = 0; i < webTypes.size(); ++i)
types.add(webTypes[i]);
- for (ListHashSet<String>::const_iterator it = types.begin(); it != types.end(); ++it) {
- if (pasteMode == PlainTextOnly && *it != mimeTypeTextPlain)
+ for (const String& type : types) {
+ if (pasteMode == PlainTextOnly && type != mimeTypeTextPlain)
continue;
- dataObject->m_itemList.append(DataObjectItem::createFromPasteboard(*it, sequenceNumber));
+ dataObject->m_itemList.append(DataObjectItem::createFromPasteboard(type, sequenceNumber));
}
return dataObject.release();
}
« no previous file with comments | « no previous file | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698