Changeset 9992 in webkit for trunk/JavaScriptCore/kjs/ustring.cpp
- Timestamp:
- Jul 31, 2005, 10:02:13 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ustring.cpp
r9768 r9992 43 43 #include "dtoa.h" 44 44 45 #if APPLE_CHANGES 45 #include <algorithm> 46 47 using std::max; 46 48 47 49 #include <unicode/uchar.h> 48 49 #endif50 50 51 51 namespace KJS { … … 150 150 UChar UChar::toLower() const 151 151 { 152 #if APPLE_CHANGES153 152 return static_cast<unsigned short>(u_tolower(uc)); 154 #else155 // ### properly support unicode tolower156 if (uc >= 256 || islower(uc))157 return *this;158 159 return (unsigned char)tolower(uc);160 #endif161 153 } 162 154 163 155 UChar UChar::toUpper() const 164 156 { 165 #if APPLE_CHANGES166 157 return static_cast<unsigned short>(u_toupper(uc)); 167 #else168 if (uc >= 256 || isupper(uc))169 return *this;170 171 return (unsigned char)toupper(uc);172 #endif173 158 } 174 159 … … 641 626 UChar *buffer = static_cast<UChar *>(kjs_fast_malloc(totalLength * sizeof(UChar))); 642 627 643 int maxCount = MAX(rangeCount, separatorCount);628 int maxCount = max(rangeCount, separatorCount); 644 629 int bufferPos = 0; 645 630 for (int i = 0; i < maxCount; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.