[webkit-reviews] review granted: [Bug 116528] [WINCE] Add wtf_bsearch() : [Attachment 202403] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 21 08:54:19 PDT 2013


Darin Adler <darin at apple.com> has granted Patrick R. Gansterer
<paroga at paroga.com>'s request for review:
Bug 116528: [WINCE] Add wtf_bsearch()
https://bugs.webkit.org/show_bug.cgi?id=116528

Attachment 202403: Patch
https://bugs.webkit.org/attachment.cgi?id=202403&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=202403&action=review


>> Source/WTF/wtf/StdLibExtras.h:267
>> +inline void* wtf_bsearch(const void* key, const void* base, size_t count,
size_t size, int (*compare)(const void *, const void *))
> 
> wtf_bsearch is incorrectly named. Don't use underscores in your identifier
names.	[readability/naming/underscores] [4]

This should just be named bsearch. There’s no value to naming it wtf_bsearch
and then redirecting with a macro. There may be some reason for this idiom
elsewhere, but not here.

It’s strange to inline this. It should be just a normal non-inline function,
but I suppose you inlined it because you don’t know of a good .cpp file to put
it in.


More information about the webkit-reviews mailing list