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

Unified Diff: Source/core/events/CompositionEvent.cpp

Issue 637223008: Use C++11 range-based loop in core/events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/events/DOMWindowEventQueue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/CompositionEvent.cpp
diff --git a/Source/core/events/CompositionEvent.cpp b/Source/core/events/CompositionEvent.cpp
index 0dd11747a4ffaabc962d7d6fe632a110f79286d6..ffad1b7db09fa4ff6e2f1c1bd53c57f7998f40f7 100644
--- a/Source/core/events/CompositionEvent.cpp
+++ b/Source/core/events/CompositionEvent.cpp
@@ -83,16 +83,16 @@ void CompositionEvent::initializeSegments(const Vector<CompositionUnderline>* un
return;
}
- for (size_t i = 0; i < underlines->size(); ++i) {
- if (underlines->at(i).thick) {
- m_activeSegmentStart = underlines->at(i).startOffset;
- m_activeSegmentEnd = underlines->at(i).endOffset;
+ for (const auto& underline : *underlines) {
+ if (underline.thick) {
+ m_activeSegmentStart = underline.startOffset;
+ m_activeSegmentEnd = underline.endOffset;
break;
}
}
- for (size_t i = 0; i < underlines->size(); ++i)
- m_segments.append(underlines->at(i).startOffset);
+ for (const auto& underline : *underlines)
+ m_segments.append(underline.startOffset);
}
const AtomicString& CompositionEvent::interfaceName() const
« no previous file with comments | « no previous file | Source/core/events/DOMWindowEventQueue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698