Changeset 26892 in webkit for trunk/JavaScriptCore/kjs/internal.cpp
- Timestamp:
- Oct 22, 2007, 11:39:46 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.cpp
r26688 r26892 1 1 /* 2 * This file is part of the KDE libraries3 2 * Copyright (C) 1999-2002 Harri Porten ([email protected]) 4 3 * Copyright (C) 2001 Peter Kelly ([email protected]) 5 * Copyright (C) 2004 Apple Computer, Inc.4 * Copyright (C) 2004, 2007 Apple Inc. All rights reserved. 6 5 * 7 6 * This library is free software; you can redistribute it and/or … … 113 112 } 114 113 115 // FIXME: We can optimize this to work like JSValue::getUInt32. I'm ignoring it for now 116 // because it never shows up on profiles. 114 bool NumberImp::getInt32(int32_t& int32) const 115 { 116 if (!(val >= -2147483648.0 && val < 2147483648.0)) 117 return false; 118 int32 = static_cast<int32_t>(val); 119 return true; 120 } 121 117 122 bool NumberImp::getUInt32(uint32_t& uint32) const 118 123 { 119 uint32 = (uint32_t)val; 120 return (double)uint32 == val; 124 if (!(val >= 0.0 && val < 4294967296.0)) 125 return false; 126 uint32 = static_cast<uint32_t>(val); 127 return true; 121 128 } 122 129
Note:
See TracChangeset
for help on using the changeset viewer.