[webkit-reviews] review denied: [Bug 118432] HashTable-like structures should return a boolean on remove : [Attachment 206172] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 5 18:12:08 PDT 2013
Benjamin Poulain <benjamin at webkit.org> has denied Rafael Brandao
<rafael.lobo at webkit.org>'s request for review:
Bug 118432: HashTable-like structures should return a boolean on remove
https://bugs.webkit.org/show_bug.cgi?id=118432
Attachment 206172: Patch
https://bugs.webkit.org/attachment.cgi?id=206172&action=review
------- Additional Comments from Benjamin Poulain <benjamin at webkit.org>
I don't think this would be an improvement.
The problem is you can think of the return value in two ways:
-removing the value failed.
-the value was not there in the first place.
I think your comment is a great example of that problem:
// Returns true if the value is removed.
-> By that logic, false means the value is not removed, it is still in the set.
Now to solve your ResourceLoadScheduler problem, you should do something along
those lines:
Iterator foobar = set.find(key);
if (foobar != end) {
set.remove(foobar);
return;
}
More information about the webkit-reviews
mailing list