capacity=otherCapacity;
needToRelease=FALSE;
}
- };
+ }
/**
* Deletes the array (if owned) and allocates a new one, copying length T items.
* Returns the new array pointer.
}
}
/* No comparison operators with other MaybeStackArray's. */
- bool operator==(const MaybeStackArray & /*other*/) {return FALSE;};
- bool operator!=(const MaybeStackArray & /*other*/) {return TRUE;};
+ bool operator==(const MaybeStackArray & /*other*/) {return FALSE;}
+ bool operator!=(const MaybeStackArray & /*other*/) {return TRUE;}
/* No ownership transfer: No copy constructor, no assignment operator. */
- MaybeStackArray(const MaybeStackArray & /*other*/) {};
- void operator=(const MaybeStackArray & /*other*/) {};
+ MaybeStackArray(const MaybeStackArray & /*other*/) {}
+ void operator=(const MaybeStackArray & /*other*/) {}
// No heap allocation. Use only on the stack.
// (Declaring these functions private triggers a cascade of problems:
capacity=otherCapacity;
needToRelease=FALSE;
}
- };
+ }
/**
* Deletes the memory block (if owned) and allocates a new one,
* copying the header and length T array items.
}
}
/* No comparison operators with other MaybeStackHeaderAndArray's. */
- bool operator==(const MaybeStackHeaderAndArray & /*other*/) {return FALSE;};
- bool operator!=(const MaybeStackHeaderAndArray & /*other*/) {return TRUE;};
+ bool operator==(const MaybeStackHeaderAndArray & /*other*/) {return FALSE;}
+ bool operator!=(const MaybeStackHeaderAndArray & /*other*/) {return TRUE;}
/* No ownership transfer: No copy constructor, no assignment operator. */
- MaybeStackHeaderAndArray(const MaybeStackHeaderAndArray & /*other*/) {};
- void operator=(const MaybeStackHeaderAndArray & /*other*/) {};
+ MaybeStackHeaderAndArray(const MaybeStackHeaderAndArray & /*other*/) {}
+ void operator=(const MaybeStackHeaderAndArray & /*other*/) {}
// No heap allocation. Use only on the stack.
// (Declaring these functions private triggers a cascade of problems;
int32_t start = current();
- UTEXT_PREVIOUS32(fText);
+ (void)UTEXT_PREVIOUS32(fText);
int32_t lastResult = handlePrevious(fData->fReverseTable);
if (lastResult == UBRK_DONE) {
lastResult = 0;
// move forward one codepoint to prepare for moving back to a
// safe point.
// this handles offset being between a supplementary character
- UTEXT_NEXT32(fText);
+ (void)UTEXT_NEXT32(fText);
// handlePrevious will move most of the time to < 1 boundary away
handlePrevious(fData->fSafeRevTable);
int32_t result = next();
if (fData->fSafeFwdTable != NULL) {
// backup plan if forward safe table is not available
utext_setNativeIndex(fText, offset);
- UTEXT_PREVIOUS32(fText);
+ (void)UTEXT_PREVIOUS32(fText);
// handle next will give result >= offset
handleNext(fData->fSafeFwdTable);
// previous will give result 0 or 1 boundary away from offset,
// indices to the containing code point.
// For breakitereator::preceding only, these non-code-point indices need to be moved
// up to refer to the following codepoint.
- UTEXT_NEXT32(fText);
+ (void)UTEXT_NEXT32(fText);
offset = (int32_t)UTEXT_GETNATIVEINDEX(fText);
}
// (Change would interact with safe rules.)
// TODO: change RBBI behavior for off-boundary indices to match that of UText?
// affects only preceding(), seems cleaner, but is slightly different.
- UTEXT_PREVIOUS32(fText);
+ (void)UTEXT_PREVIOUS32(fText);
handleNext(fData->fSafeFwdTable);
int32_t result = (int32_t)UTEXT_GETNATIVEINDEX(fText);
while (result >= offset) {
// if they use safe tables at all. We have certainly never described
// to anyone how to work with just one safe table.
utext_setNativeIndex(fText, offset);
- UTEXT_NEXT32(fText);
+ (void)UTEXT_NEXT32(fText);
// handle previous will give result <= offset
handlePrevious(fData->fSafeRevTable);
// Ran off start, no match found.
// move one index one (towards the start, since we are doing a previous())
UTEXT_SETNATIVEINDEX(fText, initialPosition);
- UTEXT_PREVIOUS32(fText); // TODO: shouldn't be necessary. We're already at beginning. Check.
+ (void)UTEXT_PREVIOUS32(fText); // TODO: shouldn't be necessary. We're already at beginning. Check.
}
break;
}
int32_t pos = -1;
const UHashElement* element = NULL;
while ( (element = fAffixPatternsForCurrency->nextElement(pos)) != NULL ) {
- const UHashTok keyTok = element->key;
const UHashTok valueTok = element->value;
const AffixPatternsForCurrency* affixPtn = (AffixPatternsForCurrency*)valueTok.pointer;
UBool tmpStatus[fgStatusLength];
int32_t pos = -1;
const UHashElement* element = NULL;
while ( (element = table->nextElement(pos)) != NULL ) {
- const UHashTok keyTok = element->key;
const UHashTok valueTok = element->value;
const AffixesForCurrency* value = (AffixesForCurrency*)valueTok.pointer;
delete value;
int32_t pos = -1;
const UHashElement* element = NULL;
while ( (element = fAffixPatternsForCurrency->nextElement(pos)) != NULL ) {
- const UHashTok keyTok = element->key;
const UHashTok valueTok = element->value;
const AffixPatternsForCurrency* value = (AffixPatternsForCurrency*)valueTok.pointer;
delete value;
int32_t compare(const DigitList& other);
- inline UBool operator!=(const DigitList& other) const { return !operator==(other); };
+ inline UBool operator!=(const DigitList& other) const { return !operator==(other); }
/**
* Clears out the digits.
/** Test for a Nan
* @return TRUE if the number is a NaN
*/
- UBool isNaN(void) const {return decNumberIsNaN(fDecNumber);};
+ UBool isNaN(void) const {return decNumberIsNaN(fDecNumber);}
- UBool isInfinite() const {return decNumberIsInfinite(fDecNumber);};
+ UBool isInfinite() const {return decNumberIsInfinite(fDecNumber);}
/** Reduce, or normalize. Removes trailing zeroes, adjusts exponent appropriately. */
void reduce();
void trim();
/** Set to zero */
- void setToZero() {uprv_decNumberZero(fDecNumber);};
+ void setToZero() {uprv_decNumberZero(fDecNumber);}
/** get the number of digits in the decimal number */
- int32_t digits() const {return fDecNumber->digits;};
+ int32_t digits() const {return fDecNumber->digits;}
/**
* Round the number to the given number of digits.
*/
void ensureCapacity(int32_t requestedSize, UErrorCode &status);
- UBool isPositive(void) const { return decNumberIsNegative(fDecNumber) == 0;};
+ UBool isPositive(void) const { return decNumberIsNegative(fDecNumber) == 0;}
void setPositive(UBool s);
void setDecimalAt(int32_t d);
int32_t pos = -1;
const UHashElement* element = NULL;
while ( (element = hTable->nextElement(pos)) != NULL ) {
- const UHashTok keyTok = element->key;
const UHashTok valueTok = element->value;
const UnicodeString* value = (UnicodeString*)valueTok.pointer;
delete[] value;
/*
*******************************************************************************
-* Copyright (C) 2007-2009, International Business Machines Corporation and
+* Copyright (C) 2007-2011, International Business Machines Corporation and
* others. All Rights Reserved. *
*******************************************************************************
*
void set(const UnicodeString& patternString);
UBool isQuoteLiteral(const UnicodeString& s) const;
void getQuoteLiteral(UnicodeString& quote, int32_t *itemIndex);
- int32_t getCanonicalIndex(const UnicodeString& s) { return getCanonicalIndex(s, TRUE); };
+ int32_t getCanonicalIndex(const UnicodeString& s) { return getCanonicalIndex(s, TRUE); }
int32_t getCanonicalIndex(const UnicodeString& s, UBool strict);
UBool isPatternSeparator(UnicodeString& field);
void setFilter(UErrorCode &status);
int32_t missingFieldMask;
int32_t extraFieldMask;
- DistanceInfo() {};
- virtual ~DistanceInfo() {};
- void clear() { missingFieldMask = extraFieldMask = 0; };
+ DistanceInfo() {}
+ virtual ~DistanceInfo() {}
+ void clear() { missingFieldMask = extraFieldMask = 0; }
void setTo(DistanceInfo& other);
- void addMissing(int32_t field) { missingFieldMask |= (1<<field); };
- void addExtra(int32_t field) { extraFieldMask |= (1<<field); };
+ void addMissing(int32_t field) { missingFieldMask |= (1<<field); }
+ void addExtra(int32_t field) { extraFieldMask |= (1<<field); }
};
class DateTimeMatcher: public UMemory {
int32_t getDistance(const DateTimeMatcher& other, int32_t includeMask, DistanceInfo& distanceInfo);
DateTimeMatcher();
DateTimeMatcher(const DateTimeMatcher& other);
- virtual ~DateTimeMatcher() {};
+ virtual ~DateTimeMatcher() {}
int32_t getFieldMask();
};
/*
******************************************************************************
-* Copyright (C) 1997-2008, International Business Machines
+* Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* file name: nfrlist.h
NFRuleList(uint32_t capacity = 10)
: fStuff(capacity ? (NFRule**)uprv_malloc(capacity * sizeof(NFRule*)) : NULL)
, fCount(0)
- , fCapacity(capacity) {};
+ , fCapacity(capacity) {}
~NFRuleList() {
if (fStuff) {
for(uint32_t i = 0; i < fCount; ++i) {
*/
class LocalizationInfo : public UMemory {
protected:
- virtual ~LocalizationInfo() {};
+ virtual ~LocalizationInfo() {}
uint32_t refcount;
public:
// TODO: Report errors for mal-formed \u escapes?
// As this is, the original sequence is output, which may be OK.
if (context.lastOffset == offset) {
- UTEXT_PREVIOUS32(replacement);
+ (void)UTEXT_PREVIOUS32(replacement);
} else if (context.lastOffset != offset-1) {
utext_moveIndex32(replacement, offset - context.lastOffset - 1);
}
}
} else {
- UTEXT_NEXT32(replacement);
+ (void)UTEXT_NEXT32(replacement);
// Plain backslash escape. Just put out the escaped character.
if (U_IS_BMP(c)) {
UChar c16 = (UChar)c;
if (u_isdigit(digitC) == FALSE) {
break;
}
- UTEXT_NEXT32(replacement);
+ (void)UTEXT_NEXT32(replacement);
groupNum=groupNum*10 + u_charDigitValue(digitC);
numDigits++;
if (numDigits >= fPattern->fMaxCaptureDigits) {
return FALSE;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
- UTEXT_NEXT32(fInputText);
+ (void)UTEXT_NEXT32(fInputText);
startPos = UTEXT_GETNATIVEINDEX(fInputText);
}
} else {
return FALSE;
}
UTEXT_SETNATIVEINDEX(fInputText, startPos);
- UTEXT_NEXT32(fInputText);
+ (void)UTEXT_NEXT32(fInputText);
startPos = UTEXT_GETNATIVEINDEX(fInputText);
// Note that it's perfectly OK for a pattern to have a zero-length
// match at the end of a string, so we must make sure that the loop
if (((c & 0x7f) <= 0x29) && // First quickly bypass as many chars as possible
((c<=0x0d && c>=0x0a) || c==0x85 ||c==0x2028 || c==0x2029 )) {
if (c == 0x0d && startPos < fActiveLimit && UTEXT_CURRENT32(fInputText) == 0x0a) {
- UTEXT_NEXT32(fInputText);
+ (void)UTEXT_NEXT32(fInputText);
startPos = UTEXT_GETNATIVEINDEX(fInputText);
}
MatchAt(startPos, FALSE, fDeferredStatus);
if (UTEXT_GETNATIVEINDEX(fInputText) >= fAnchorLimit) {
if ((c>=0x0a && c<=0x0d) || c==0x85 || c==0x2028 || c==0x2029) {
// If not in the middle of a CR/LF sequence
- if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && (UTEXT_PREVIOUS32(fInputText), UTEXT_PREVIOUS32(fInputText))==0x0d)) {
+ if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && ((void)UTEXT_PREVIOUS32(fInputText), UTEXT_PREVIOUS32(fInputText))==0x0d)) {
// At new-line at end of input. Success
fHitEnd = TRUE;
fRequireEnd = TRUE;
if (sets[URX_GC_LV]->contains(c)) goto GC_V;
if (sets[URX_GC_LVT]->contains(c)) goto GC_T;
if (sets[URX_GC_V]->contains(c)) goto GC_V;
- UTEXT_PREVIOUS32(fInputText);
+ (void)UTEXT_PREVIOUS32(fInputText);
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
goto GC_Extend;
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
if (sets[URX_GC_V]->contains(c)) goto GC_V;
if (sets[URX_GC_T]->contains(c)) goto GC_T;
- UTEXT_PREVIOUS32(fInputText);
+ (void)UTEXT_PREVIOUS32(fInputText);
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
goto GC_Extend;
c = UTEXT_NEXT32(fInputText);
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
if (sets[URX_GC_T]->contains(c)) goto GC_T;
- UTEXT_PREVIOUS32(fInputText);
+ (void)UTEXT_PREVIOUS32(fInputText);
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
goto GC_Extend;
if (sets[URX_GC_EXTEND]->contains(c) == FALSE) {
break;
}
- UTEXT_NEXT32(fInputText);
+ (void)UTEXT_NEXT32(fInputText);
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
}
goto GC_Done;
// In the case of a CR/LF, we need to advance over both.
UChar32 nextc = UTEXT_CURRENT32(fInputText);
if (nextc == 0x0a) {
- UTEXT_NEXT32(fInputText);
+ (void)UTEXT_NEXT32(fInputText);
fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
}
}
(*lbStartIdx)--;
} else {
UTEXT_SETNATIVEINDEX(fInputText, *lbStartIdx);
- UTEXT_PREVIOUS32(fInputText);
+ (void)UTEXT_PREVIOUS32(fInputText);
*lbStartIdx = UTEXT_GETNATIVEINDEX(fInputText);
}
}
(*lbStartIdx)--;
} else {
UTEXT_SETNATIVEINDEX(fInputText, *lbStartIdx);
- UTEXT_PREVIOUS32(fInputText);
+ (void)UTEXT_PREVIOUS32(fInputText);
*lbStartIdx = UTEXT_GETNATIVEINDEX(fInputText);
}
}
};
TimeZoneFormatImpl::TimeZoneFormatImpl(const Locale& locale, UErrorCode& status)
-: fLocale(locale), fTimeZoneNames(NULL), fTimeZoneGenericNames(NULL), fLock(NULL) {
+: fLock(NULL),fLocale(locale), fTimeZoneNames(NULL), fTimeZoneGenericNames(NULL) {
const char* region = fLocale.getCountry();
int32_t regionLen = uprv_strlen(region);
/*
********************************************************************************
-* Copyright (C) 1997-2010, International Business Machines
+* Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
* big decimal formatting.
* @internal
*/
- DigitList *getDigitList() const { return fDecimalNum;};
+ DigitList *getDigitList() const { return fDecimalNum;}
/**
* Adopt, and set value from, a DigitList
* @return TRUE if the objects are different.
* @stable ICU 2.4
*/
- inline UBool operator!=(const RegexPattern& that) const {return ! operator ==(that);};
+ inline UBool operator!=(const RegexPattern& that) const {return ! operator ==(that);}
/**
* Assignment operator. After assignment, this RegexPattern will behave identically