[Webkit-unassigned] [Bug 20746] Port WebKit to Qt on Windows CE
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 22 23:14:38 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=20746
eric at webkit.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #23469|review? |review-
Flag| |
------- Comment #27 from eric at webkit.org 2008-09-22 23:14 PDT -------
(From update of attachment 23469)
This is nice. 2 comments though.
This will crash if endPtr is null:
+ return string != *endPtr && retVal != LONG_MIN && retVal != LONG_MAX;
Maybe strtol would also crash in that situation, not sure?
Also, since this is our own function:
+static bool parseLong(long& retVal, const char* string, char** endPtr, int
base)
I think it's clearer (less typing at least), to use:
+static bool parseLong(long& retVal, const char* string, char*& endPtr, int
base)
Then one doesn't need to add & to every callsite.
We also could make base =10 a default paramteter to further clean up the
callsites.
I think this patch is really OK as is, but given that we're in this code, I
feel like we should clean it up a bit more. I guess I could do that and post a
response patch for you. I'll do that.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list