Changeset 56342 in webkit


Ignore:
Timestamp:
Mar 22, 2010 10:39:57 AM (14 years ago)
Author:
ddkilzer@apple.com
Message:

<http://webkit.org/b/36431> Clean up 'int' use in UString.cpp after r54789

Reviewed by Darin Adler.

  • runtime/UString.cpp:

(JSC::UString::from): Changed argument type from 'unsigned int'
to 'unsigned' to match WebKit coding style.
(JSC::UString::find): Changed static_cast<int>() to
static_cast<unsigned>() now that this method returns unsigned.
(JSC::UString::rfind): Ditto.

  • runtime/UString.h:

(JSC::UString::from): Changed argument type from 'unsigned int'
to 'unsigned' to match WebKit coding style.

Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r56333 r56342  
     12010-03-22  David Kilzer  <ddkilzer@apple.com>
     2
     3        <http://webkit.org/b/36431> Clean up 'int' use in UString.cpp after r54789
     4
     5        Reviewed by Darin Adler.
     6
     7        * runtime/UString.cpp:
     8        (JSC::UString::from): Changed argument type from 'unsigned int'
     9        to 'unsigned' to match WebKit coding style.
     10        (JSC::UString::find): Changed static_cast<int>() to
     11        static_cast<unsigned>() now that this method returns unsigned.
     12        (JSC::UString::rfind): Ditto.
     13        * runtime/UString.h:
     14        (JSC::UString::from): Changed argument type from 'unsigned int'
     15        to 'unsigned' to match WebKit coding style.
     16
    1172010-03-22  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
    218
  • trunk/JavaScriptCore/runtime/UString.cpp

    r56085 r56342  
    238238}
    239239
    240 UString UString::from(unsigned int u)
     240UString UString::from(unsigned u)
    241241{
    242242    UChar buf[sizeof(u) * 3];
     
    544544        for (const UChar* c = data() + pos; c < end; c++) {
    545545            if (*c == ch)
    546                 return static_cast<int>(c - data());
     546                return static_cast<unsigned>(c - data());
    547547        }
    548548        return NotFound;
     
    561561    for (const UChar* c = data() + pos; c <= end; c++) {
    562562        if (c[0] == fchar && !memcmp(c + 1, fdata, fsizeminusone))
    563             return static_cast<int>(c - data());
     563            return static_cast<unsigned>(c - data());
    564564    }
    565565
     
    572572    for (const UChar* c = data() + pos; c < end; c++) {
    573573        if (*c == ch)
    574             return static_cast<int>(c - data());
     574            return static_cast<unsigned>(c - data());
    575575    }
    576576
     
    592592    for (const UChar* c = data() + pos; c >= data(); c--) {
    593593        if (*c == *fdata && !memcmp(c + 1, fdata + 1, fsizeminusone))
    594             return static_cast<int>(c - data());
     594            return static_cast<unsigned>(c - data());
    595595    }
    596596
     
    606606    for (const UChar* c = data() + pos; c >= data(); c--) {
    607607        if (*c == ch)
    608             return static_cast<int>(c - data());
     608            return static_cast<unsigned>(c - data());
    609609    }
    610610
  • trunk/JavaScriptCore/runtime/UString.h

    r55833 r56342  
    110110        static UString from(int);
    111111        static UString from(long long);
    112         static UString from(unsigned int);
     112        static UString from(unsigned);
    113113        static UString from(long);
    114114        static UString from(double);
Note: See TracChangeset for help on using the changeset viewer.