Changeset 34372 in webkit for trunk/JavaScriptCore/kjs/value.cpp


Ignore:
Timestamp:
Jun 4, 2008, 10:36:55 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-04 Sam Weinig <[email protected]>

Reviewed by Maciej Stachowiak.

Big cleanup of formatting and whitespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/value.cpp

    r34355 r34372  
    8181static const double D32 = 4294967296.0;
    8282
    83 void *JSCell::operator new(size_t size)
     83void* JSCell::operator new(size_t size)
    8484{
    8585    return Collector::allocate(size);
     
    102102
    103103// ECMA 9.4
    104 double JSValue::toInteger(ExecState *exec) const
     104double JSValue::toInteger(ExecState* exec) const
    105105{
    106106    int32_t i;
     
    111111}
    112112
    113 double JSValue::toIntegerPreserveNaN(ExecState *exec) const
     113double JSValue::toIntegerPreserveNaN(ExecState* exec) const
    114114{
    115115    int32_t i;
     
    172172}
    173173
    174 bool JSCell::getNumber(double &numericValue) const
     174bool JSCell::getNumber(double& numericValue) const
    175175{
    176176    if (!isNumber())
    177177        return false;
    178     numericValue = static_cast<const NumberImp *>(this)->value();
     178    numericValue = static_cast<const NumberImp*>(this)->value();
    179179    return true;
    180180}
     
    182182double JSCell::getNumber() const
    183183{
    184     return isNumber() ? static_cast<const NumberImp *>(this)->value() : NaN;
    185 }
    186 
    187 bool JSCell::getString(UString &stringValue) const
     184    return isNumber() ? static_cast<const NumberImp*>(this)->value() : NaN;
     185}
     186
     187bool JSCell::getString(UString&stringValue) const
    188188{
    189189    if (!isString())
    190190        return false;
    191     stringValue = static_cast<const StringImp *>(this)->value();
     191    stringValue = static_cast<const StringImp*>(this)->value();
    192192    return true;
    193193}
     
    195195UString JSCell::getString() const
    196196{
    197     return isString() ? static_cast<const StringImp *>(this)->value() : UString();
    198 }
    199 
    200 JSObject *JSCell::getObject()
    201 {
    202     return isObject() ? static_cast<JSObject *>(this) : 0;
    203 }
    204 
    205 const JSObject *JSCell::getObject() const
    206 {
    207     return isObject() ? static_cast<const JSObject *>(this) : 0;
     197    return isString() ? static_cast<const StringImp*>(this)->value() : UString();
     198}
     199
     200JSObject*JSCell::getObject()
     201{
     202    return isObject() ? static_cast<JSObject*>(this) : 0;
     203}
     204
     205const JSObject* JSCell::getObject() const
     206{
     207    return isObject() ? static_cast<const JSObject*>(this) : 0;
    208208}
    209209
Note: See TracChangeset for help on using the changeset viewer.