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

Unified Diff: Source/core/html/forms/FormController.cpp

Issue 167123002: Simpler return value from HashTable::add()/HashMap::add() and others (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | « Source/core/html/forms/CheckedRadioButtons.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/FormController.cpp
diff --git a/Source/core/html/forms/FormController.cpp b/Source/core/html/forms/FormController.cpp
index 8e6ea243c26945bb87bd1b7f553aa3a11bb42aff..09f2b0ef05ed45a8fea3c43dfa294fd67d56bb8a 100644
--- a/Source/core/html/forms/FormController.cpp
+++ b/Source/core/html/forms/FormController.cpp
@@ -356,14 +356,14 @@ const AtomicString& FormKeyGenerator::formKey(const HTMLFormControlElementWithSt
String signature = formSignature(*form);
ASSERT(!signature.isNull());
FormSignatureToNextIndexMap::AddResult result = m_formSignatureToNextIndexMap.add(signature, 0);
- unsigned nextIndex = result.iterator->value++;
+ unsigned nextIndex = result.storedValue->value++;
StringBuilder formKeyBuilder;
formKeyBuilder.append(signature);
formKeyBuilder.appendLiteral(" #");
formKeyBuilder.appendNumber(nextIndex);
FormToKeyMap::AddResult addFormKeyresult = m_formToKeyMap.add(form, formKeyBuilder.toAtomicString());
- return addFormKeyresult.iterator->value;
+ return addFormKeyresult.storedValue->value;
}
void FormKeyGenerator::willDeleteForm(HTMLFormElement* form)
@@ -402,8 +402,8 @@ PassOwnPtr<FormController::SavedFormStateMap> FormController::createSavedFormSta
continue;
SavedFormStateMap::AddResult result = stateMap->add(keyGenerator->formKey(*control), nullptr);
if (result.isNewEntry)
- result.iterator->value = SavedFormState::create();
- result.iterator->value->appendControlState(control->name(), control->type(), control->saveFormControlState());
+ result.storedValue->value = SavedFormState::create();
+ result.storedValue->value->appendControlState(control->name(), control->type(), control->saveFormControlState());
}
return stateMap.release();
}
« no previous file with comments | « Source/core/html/forms/CheckedRadioButtons.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698