mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-1913 Less aggressive optimization of the iSeries fix.
X-SVN-Rev: 9247
This commit is contained in:
parent
751ad79746
commit
e8a6207142
1 changed files with 9 additions and 5 deletions
|
@ -20,8 +20,8 @@ U_NAMESPACE_BEGIN
|
|||
* or a pointer. If a hint bit is zero, then the associated
|
||||
* token is assumed to be an integer. This is needed for iSeries
|
||||
*/
|
||||
#define HINT_KEY_POINTER (0)
|
||||
#define HINT_KEY_INTEGER (1)
|
||||
#define HINT_KEY_POINTER (1)
|
||||
#define HINT_KEY_INTEGER (0)
|
||||
|
||||
const char UVector::fgClassID=0;
|
||||
|
||||
|
@ -292,10 +292,14 @@ int32_t UVector::indexOf(UHashTok key, int32_t startIndex, int8_t hint) const {
|
|||
/* Pointers are not always the same size as ints so to perform
|
||||
* a valid comparision we need to know whether we are being
|
||||
* provided an int or a pointer. */
|
||||
if (((hint & HINT_KEY_INTEGER) && (key.integer == elements[i].integer))
|
||||
|| (key.pointer == elements[i].pointer))
|
||||
{
|
||||
if (hint & HINT_KEY_POINTER) {
|
||||
if (key.pointer == elements[i].pointer) {
|
||||
return i;
|
||||
}
|
||||
} else {
|
||||
if (key.integer == elements[i].integer) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue