Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: source/i18n/collationfastlatin.cpp

Issue 877193003: ICU update to 54.1 step 7 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: add one more msvc's warning fix Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/data/zone/reslocal.mk ('k') | source/i18n/decimfmt.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * Copyright (C) 2013-2014, International Business Machines 3 * Copyright (C) 2013-2014, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ******************************************************************************* 5 *******************************************************************************
6 * collationfastlatin.cpp 6 * collationfastlatin.cpp
7 * 7 *
8 * created on: 2013aug18 8 * created on: 2013aug18
9 * created by: Markus W. Scherer 9 * created by: Markus W. Scherer
10 */ 10 */
(...skipping 21 matching lines...) Expand all
32 32
33 uint32_t miniVarTop; 33 uint32_t miniVarTop;
34 if((settings.options & CollationSettings::ALTERNATE_MASK) == 0) { 34 if((settings.options & CollationSettings::ALTERNATE_MASK) == 0) {
35 // No mini primaries are variable, set a variableTop just below the 35 // No mini primaries are variable, set a variableTop just below the
36 // lowest long mini primary. 36 // lowest long mini primary.
37 miniVarTop = MIN_LONG - 1; 37 miniVarTop = MIN_LONG - 1;
38 } else { 38 } else {
39 uint32_t v1 = settings.variableTop >> 24; 39 uint32_t v1 = settings.variableTop >> 24;
40 int32_t headerLength = *table & 0xff; 40 int32_t headerLength = *table & 0xff;
41 int32_t i = headerLength - 1; 41 int32_t i = headerLength - 1;
42 if(i <= 0 || v1 > (table[i] & 0x7f)) { 42 if(i <= 0 || v1 > (table[i] & 0x7fu)) {
43 return -1; // variableTop >= digits, should not occur 43 return -1; // variableTop >= digits, should not occur
44 } 44 }
45 while(i > 1 && v1 <= (table[i - 1] & 0x7f)) { --i; } 45 while(i > 1 && v1 <= (table[i - 1] & 0x7fu)) { --i; }
46 // In the table header, the miniVarTop is in bits 15..7, with 4 zero bit s 19..16 implied. 46 // In the table header, the miniVarTop is in bits 15..7, with 4 zero bit s 19..16 implied.
47 // Shift right to make it comparable with long mini primaries in bits 15 ..3. 47 // Shift right to make it comparable with long mini primaries in bits 15 ..3.
48 miniVarTop = (table[i] & 0xff80) >> 4; 48 miniVarTop = (table[i] & 0xff80) >> 4;
49 } 49 }
50 50
51 const uint8_t *reorderTable = settings.reorderTable; 51 const uint8_t *reorderTable = settings.reorderTable;
52 if(reorderTable != NULL) { 52 if(reorderTable != NULL) {
53 const uint16_t *scripts = data->scripts; 53 const uint16_t *scripts = data->scripts;
54 int32_t length = data->scriptsLength; 54 int32_t length = data->scriptsLength;
55 uint32_t prevLastByte = 0; 55 uint32_t prevLastByte = 0;
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 U_ASSERT(ce >= MIN_LONG); 1074 U_ASSERT(ce >= MIN_LONG);
1075 pair &= TWO_LONG_PRIMARIES_MASK; // variable 1075 pair &= TWO_LONG_PRIMARIES_MASK; // variable
1076 } 1076 }
1077 } 1077 }
1078 return pair; 1078 return pair;
1079 } 1079 }
1080 1080
1081 U_NAMESPACE_END 1081 U_NAMESPACE_END
1082 1082
1083 #endif // !UCONFIG_NO_COLLATION 1083 #endif // !UCONFIG_NO_COLLATION
OLDNEW
« no previous file with comments | « source/data/zone/reslocal.mk ('k') | source/i18n/decimfmt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698