ICU-900 Fixed some compiler warnings.
X-SVN-Rev: 4369
This commit is contained in:
parent
d3c94b5f9a
commit
09c96ba805
@ -261,32 +261,32 @@ BreakIterator * DictionaryBasedBreakIterator::createBufferClone(void *stackBuff
|
|||||||
UErrorCode &status)
|
UErrorCode &status)
|
||||||
{
|
{
|
||||||
DictionaryBasedBreakIterator * localIterator;
|
DictionaryBasedBreakIterator * localIterator;
|
||||||
int32_t bufferSizeNeeded;
|
int32_t bufferSizeNeeded = 0;
|
||||||
UBool IterIsUChar;
|
UBool IterIsUChar = FALSE;
|
||||||
UBool IterIsString;
|
UBool IterIsString = FALSE;
|
||||||
|
|
||||||
if (U_FAILURE(status)){
|
if (U_FAILURE(status)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
/* // Never check for NULL on the 'this' pointer.
|
||||||
|
// It should be a fatal error when 'this' is ever NULL. [grhoten]
|
||||||
if (!this){
|
if (!this){
|
||||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (text == NULL)
|
if (text == NULL)
|
||||||
{
|
{
|
||||||
bufferSizeNeeded = (int32_t) sizeof(DictionaryBasedBreakIterator);
|
bufferSizeNeeded = (int32_t) sizeof(DictionaryBasedBreakIterator);
|
||||||
IterIsString = IterIsUChar = FALSE;
|
|
||||||
}
|
}
|
||||||
else if (text->getDynamicClassID() == StringCharacterIterator::getStaticClassID())
|
else if (text->getDynamicClassID() == StringCharacterIterator::getStaticClassID())
|
||||||
{
|
{
|
||||||
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructString);
|
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructString);
|
||||||
IterIsString = TRUE;
|
IterIsString = TRUE;
|
||||||
IterIsUChar = FALSE;
|
|
||||||
}
|
}
|
||||||
else if (text->getDynamicClassID() == UCharCharacterIterator::getStaticClassID())
|
else if (text->getDynamicClassID() == UCharCharacterIterator::getStaticClassID())
|
||||||
{
|
{
|
||||||
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructUChar);
|
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructUChar);
|
||||||
IterIsString = FALSE;
|
|
||||||
IterIsUChar = TRUE;
|
IterIsUChar = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -581,32 +581,32 @@ BreakIterator * RuleBasedBreakIterator::createBufferClone(void *stackBuffer,
|
|||||||
UErrorCode &status)
|
UErrorCode &status)
|
||||||
{
|
{
|
||||||
RuleBasedBreakIterator * localIterator;
|
RuleBasedBreakIterator * localIterator;
|
||||||
int32_t bufferSizeNeeded;
|
int32_t bufferSizeNeeded = 0;
|
||||||
UBool IterIsUChar;
|
UBool IterIsUChar = FALSE;
|
||||||
UBool IterIsString;
|
UBool IterIsString = FALSE;
|
||||||
|
|
||||||
if (U_FAILURE(status)){
|
if (U_FAILURE(status)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
/* // Never check for NULL on the 'this' pointer.
|
||||||
|
// It should be a fatal error when 'this' is ever NULL. [grhoten]
|
||||||
if (!this){
|
if (!this){
|
||||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (text == NULL)
|
if (text == NULL)
|
||||||
{
|
{
|
||||||
bufferSizeNeeded = (int32_t) sizeof(RuleBasedBreakIterator);
|
bufferSizeNeeded = (int32_t) sizeof(RuleBasedBreakIterator);
|
||||||
IterIsString = IterIsUChar = FALSE;
|
|
||||||
}
|
}
|
||||||
else if (text->getDynamicClassID() == StringCharacterIterator::getStaticClassID())
|
else if (text->getDynamicClassID() == StringCharacterIterator::getStaticClassID())
|
||||||
{
|
{
|
||||||
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructString);
|
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructString);
|
||||||
IterIsString = TRUE;
|
IterIsString = TRUE;
|
||||||
IterIsUChar = FALSE;
|
|
||||||
}
|
}
|
||||||
else if (text->getDynamicClassID() == UCharCharacterIterator::getStaticClassID())
|
else if (text->getDynamicClassID() == UCharCharacterIterator::getStaticClassID())
|
||||||
{
|
{
|
||||||
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructUChar);
|
bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructUChar);
|
||||||
IterIsString = FALSE;
|
|
||||||
IterIsUChar = TRUE;
|
IterIsUChar = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user