ICU-2268 fixed UTokenAssigner bug in UVector
X-SVN-Rev: 9816
This commit is contained in:
parent
ae8bbc8773
commit
f346c4d8f2
@ -151,8 +151,8 @@ static inline void _dbgdt(UnicodeSet* set) {
|
||||
// UnicodeString in UVector support
|
||||
//----------------------------------------------------------------
|
||||
|
||||
static void U_CALLCONV cloneUnicodeString(UHashTok dst, UHashTok src) {
|
||||
dst.pointer = new UnicodeString(*(UnicodeString*)src.pointer);
|
||||
static void U_CALLCONV cloneUnicodeString(UHashTok *dst, UHashTok *src) {
|
||||
dst->pointer = new UnicodeString(*(UnicodeString*)src->pointer);
|
||||
}
|
||||
|
||||
static int8_t U_CALLCONV compareUnicodeString(UHashTok t1, UHashTok t2) {
|
||||
|
@ -95,7 +95,7 @@ void UVector::assign(const UVector& other, UTokenAssigner *assign, UErrorCode &e
|
||||
if (elements[i].pointer != 0 && deleter != 0) {
|
||||
(*deleter)(elements[i].pointer);
|
||||
}
|
||||
(*assign)(elements[i], other.elements[i]);
|
||||
(*assign)(&elements[i], &other.elements[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ typedef int8_t U_CALLCONV USortComparator(UHashTok tok1,
|
||||
* @param dst The token to be assigned to
|
||||
* @param src The token to assign from
|
||||
*/
|
||||
typedef void U_CALLCONV UTokenAssigner(UHashTok dst,
|
||||
UHashTok src);
|
||||
typedef void U_CALLCONV UTokenAssigner(UHashTok *dst,
|
||||
UHashTok *src);
|
||||
|
||||
/**
|
||||
* <p>Ultralightweight C++ implementation of a <tt>void*</tt> vector
|
||||
|
Loading…
Reference in New Issue
Block a user