Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Differential Revision: https://phabricator.services.mozilla.com/D104676
This commit is contained in:
@@ -2170,10 +2170,8 @@ HTMLFormElement::WalkRadioGroup(const nsAString& aName,
|
||||
void HTMLFormElement::AddToRadioGroup(const nsAString& aName,
|
||||
HTMLInputElement* aRadio) {
|
||||
if (aRadio->IsRequired()) {
|
||||
mRequiredRadioButtonCounts.WithEntryHandle(aName, [](auto&& entry) {
|
||||
uint32_t& value = entry.OrInsert(0);
|
||||
++value;
|
||||
});
|
||||
uint32_t& value = mRequiredRadioButtonCounts.GetOrInsert(aName, 0);
|
||||
++value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user