Changeset 33941 in webkit for trunk/JavaScriptCore/kjs/ustring.cpp
- Timestamp:
- May 20, 2008, 1:59:16 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ustring.cpp
r33374 r33941 1274 1274 } 1275 1275 1276 int compare(const UString& s1, const UString& s2)1276 bool operator>(const UString& s1, const UString& s2) 1277 1277 { 1278 1278 const int l1 = s1.size(); … … 1287 1287 l++; 1288 1288 } 1289 if (l < lmin) 1290 return (c1[0] > c2[0]); 1291 1292 return (l1 > l2); 1293 } 1294 1295 int compare(const UString& s1, const UString& s2) 1296 { 1297 const int l1 = s1.size(); 1298 const int l2 = s2.size(); 1299 const int lmin = l1 < l2 ? l1 : l2; 1300 const UChar *c1 = s1.data(); 1301 const UChar *c2 = s2.data(); 1302 int l = 0; 1303 while (l < lmin && *c1 == *c2) { 1304 c1++; 1305 c2++; 1306 l++; 1307 } 1289 1308 1290 1309 if (l < lmin)
Note:
See TracChangeset
for help on using the changeset viewer.