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

Unified Diff: Source/core/inspector/InspectorState.cpp

Issue 800113002: Use C++11 range-based for loop in Source/core/inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase again and again! Created 6 years 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
Index: Source/core/inspector/InspectorState.cpp
diff --git a/Source/core/inspector/InspectorState.cpp b/Source/core/inspector/InspectorState.cpp
index 0b627b194f2b4b9c42c38fe18b498f16e9b090b2..bcec968eb1be96f77e124678dd7b7848492e136c 100644
--- a/Source/core/inspector/InspectorState.cpp
+++ b/Source/core/inspector/InspectorState.cpp
@@ -146,14 +146,13 @@ void InspectorCompositeState::loadFromCookie(const String& inspectorCompositeSta
if (!m_stateObject)
m_stateObject = JSONObject::create();
- InspectorStateMap::iterator end = m_inspectorStateMap.end();
- for (InspectorStateMap::iterator it = m_inspectorStateMap.begin(); it != end; ++it) {
- RefPtr<JSONObject> agentStateObject = m_stateObject->getObject(it->key);
+ for (auto& state : m_inspectorStateMap) {
+ RefPtr<JSONObject> agentStateObject = m_stateObject->getObject(state.key);
if (!agentStateObject) {
agentStateObject = JSONObject::create();
- m_stateObject->setObject(it->key, agentStateObject);
+ m_stateObject->setObject(state.key, agentStateObject);
}
- it->value->setFromCookie(agentStateObject);
+ state.value->setFromCookie(agentStateObject);
}
}
« no previous file with comments | « Source/core/inspector/InspectorResourceContentLoader.cpp ('k') | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698