mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make HashMap::put overwrite (r=jorendorff)
This commit is contained in:
parent
dd646b8dc5
commit
fc7cbdfdc8
@ -806,7 +806,11 @@ class HashMap
|
||||
|
||||
Entry *put(const Key &k, const Value &v) {
|
||||
AddPtr p = lookupForAdd(k);
|
||||
return p ? &*p : (add(p, k, v) ? &*p : NULL);
|
||||
if (p) {
|
||||
p->value = v;
|
||||
return &*p;
|
||||
}
|
||||
return add(p, k, v) ? &*p : NULL;
|
||||
}
|
||||
|
||||
void remove(const Lookup &l) {
|
||||
|
Loading…
Reference in New Issue
Block a user