mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-1923
updated compareUnsigned for optimization X-SVN-Rev: 9303
This commit is contained in:
parent
23b0573b00
commit
797337b29b
1 changed files with 11 additions and 6 deletions
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/impl/Utility.java,v $
|
||||
* $Date: 2002/07/17 23:48:06 $
|
||||
* $Revision: 1.26 $
|
||||
* $Date: 2002/07/24 01:17:21 $
|
||||
* $Revision: 1.27 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -1540,10 +1540,15 @@ public final class Utility {
|
|||
if (source == target) {
|
||||
return 0;
|
||||
}
|
||||
if ((long)(source & 0xFFFFFFFFL) >
|
||||
(long)(target & 0xFFFFFFFFL)) {
|
||||
return 1;
|
||||
if (source >= 0) {
|
||||
if (source < target || target < 0) {
|
||||
return -1;
|
||||
}
|
||||
else if (source < target && target < 0) {
|
||||
// source < 0, so
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue