ICU-900 Fixed a compiler warning on Solaris Workshop Pro v6.0
X-SVN-Rev: 5134
This commit is contained in:
parent
e0359d11ac
commit
bc397ee3f3
@ -76,6 +76,26 @@ TimeZone::getGMT(void)
|
||||
return &SIMPLE_GMT;
|
||||
}
|
||||
|
||||
/**
|
||||
* udata callback to verify the zone data.
|
||||
*/
|
||||
U_CDECL_BEGIN
|
||||
static UBool
|
||||
isTimeZoneDataAcceptable(void * /*context*/,
|
||||
const char * /*type*/, const char * /*name*/,
|
||||
const UDataInfo *pInfo) {
|
||||
return
|
||||
pInfo->size >= sizeof(UDataInfo) &&
|
||||
pInfo->isBigEndian == U_IS_BIG_ENDIAN &&
|
||||
pInfo->charsetFamily == U_CHARSET_FAMILY &&
|
||||
pInfo->dataFormat[0] == TZ_SIG_0 &&
|
||||
pInfo->dataFormat[1] == TZ_SIG_1 &&
|
||||
pInfo->dataFormat[2] == TZ_SIG_2 &&
|
||||
pInfo->dataFormat[3] == TZ_SIG_3 &&
|
||||
pInfo->formatVersion[0] == TZ_FORMAT_VERSION;
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
/**
|
||||
* Attempt to load the system zone data from icudata.dll (or its
|
||||
* equivalent). After this call returns DATA_LOADED will be true.
|
||||
@ -95,7 +115,7 @@ void TimeZone::loadZoneData() {
|
||||
if (!DATA_LOADED) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UDATA_POINTER = udata_openChoice(0, TZ_DATA_TYPE, TZ_DATA_NAME, // THIS IS NOT A LEAK!
|
||||
isDataAcceptable, 0, &status); // see the comment on udata_close line
|
||||
isTimeZoneDataAcceptable, 0, &status); // see the comment on udata_close line
|
||||
UDataMemory *data = UDATA_POINTER;
|
||||
if (U_SUCCESS(status)) {
|
||||
DATA = (TZHeader*)udata_getMemory(data);
|
||||
@ -135,24 +155,6 @@ void TimeZone::loadZoneData() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* udata callback to verify the zone data.
|
||||
*/
|
||||
UBool U_CALLCONV
|
||||
TimeZone::isDataAcceptable(void * /*context*/,
|
||||
const char * /*type*/, const char * /*name*/,
|
||||
const UDataInfo *pInfo) {
|
||||
return
|
||||
pInfo->size >= sizeof(UDataInfo) &&
|
||||
pInfo->isBigEndian == U_IS_BIG_ENDIAN &&
|
||||
pInfo->charsetFamily == U_CHARSET_FAMILY &&
|
||||
pInfo->dataFormat[0] == TZ_SIG_0 &&
|
||||
pInfo->dataFormat[1] == TZ_SIG_1 &&
|
||||
pInfo->dataFormat[2] == TZ_SIG_2 &&
|
||||
pInfo->dataFormat[3] == TZ_SIG_3 &&
|
||||
pInfo->formatVersion[0] == TZ_FORMAT_VERSION;
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
// class TimeZone
|
||||
// *****************************************************************************
|
||||
|
@ -608,11 +608,6 @@ private:
|
||||
// See source file for documentation
|
||||
static void loadZoneData(void);
|
||||
|
||||
// See source file for documentation
|
||||
static UBool U_CALLCONV isDataAcceptable(void *context,
|
||||
const char *type, const char *name,
|
||||
const UDataInfo *pInfo);
|
||||
|
||||
// See source file for documentation
|
||||
static TimeZone* createSystemTimeZone(const UnicodeString& name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user