[webkit-dev] unsigned versus size_t in WTFString.h

Adam Barth abarth at webkit.org
Tue Sep 6 21:12:26 PDT 2011


I wanted to confirm my understanding before going too far off into the
woods: Most of the uses of "unsigned" in WTFString.h should really be
"size_t", right?

http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/wtf/text/WTFString.h

For example,

unsigned length() const

should be

size_t length() const

and

size_t find(UChar c, unsigned start = 0) const

should be

size_t find(UChar c, size_t start = 0) const

(Obviously some, like "static String number(unsigned)", should stay as
unsigned.)

Thanks,
Adam


More information about the webkit-dev mailing list