*/
MaybeStackArray(int32_t newCapacity) : MaybeStackArray() {
if (capacity < newCapacity) { resize(newCapacity); }
- };
+ }
/**
* Destructor deletes the array (if owned).
*/
int32_t cpLengths[POSSIBLE_WORD_LIST_MAX]; // Word Lengths, in code points.
public:
- PossibleWord() : count(0), prefix(0), offset(-1), mark(0), current(0) {};
- ~PossibleWord() {};
+ PossibleWord() : count(0), prefix(0), offset(-1), mark(0), current(0) {}
+ ~PossibleWord() {}
// Fill the list of candidates if needed, select the longest, and return the number found
int32_t candidates( UText *text, DictionaryMatcher *dict, int32_t rangeEnd );
// Return the longest prefix this candidate location shares with a dictionary word
// Return value is in code points.
- int32_t longestPrefix() { return prefix; };
+ int32_t longestPrefix() { return prefix; }
// Mark the current candidate as the one we like
- void markCurrent() { mark = current; };
+ void markCurrent() { mark = current; }
// Get length in code points of the marked word.
- int32_t markedCPLength() { return cpLengths[mark]; };
+ int32_t markedCPLength() { return cpLengths[mark]; }
};
*/
class U_COMMON_API DictionaryMatcher : public UMemory {
public:
- DictionaryMatcher() {};
+ DictionaryMatcher() {}
virtual ~DictionaryMatcher();
// this should emulate CompactTrieDictionary::matches()
/* @param text The text in which to look for matching words. Matching begins
int32_t fPositions[8];
int16_t fKeys[8];
- LookAheadResults() : fUsedSlotLimit(0), fPositions(), fKeys() {};
+ LookAheadResults() : fUsedSlotLimit(0), fPositions(), fKeys() {}
int32_t getPosition(int16_t key) {
for (int32_t i=0; i<fUsedSlotLimit; ++i) {
fTextIdx = fBI->fPosition = fBoundaries[fBufIdx];
fBI->fRuleStatusIndex = fStatuses[fBufIdx];
}
- };
+ }
void nextOL();
void dumpCache();
private:
- static inline int32_t modChunkSize(int index) { return index & (CACHE_SIZE - 1); };
+ static inline int32_t modChunkSize(int index) { return index & (CACHE_SIZE - 1); }
static constexpr int32_t CACHE_SIZE = 128;
static_assert((CACHE_SIZE & (CACHE_SIZE-1)) == 0, "CACHE_SIZE must be power of two.");
struct RBBIRuleChar {
UChar32 fChar;
UBool fEscaped;
- RBBIRuleChar() : fChar(0), fEscaped(FALSE) {};
+ RBBIRuleChar() : fChar(0), fEscaped(FALSE) {}
};
RBBIRuleScanner(RBBIRuleBuilder *rb);
struct UInitOnce {
u_atomic_int32_t fState;
UErrorCode fErrCode;
- void reset() {fState = 0;};
- UBool isReset() {return umtx_loadAcquire(fState) == 0;};
+ void reset() {fState = 0;}
+ UBool isReset() {return umtx_loadAcquire(fState) == 0;}
// Note: isReset() is used by service registration code.
// Thread safety of this usage needs review.
};
protected:
Locale fLoc;
public:
- LocaleCacheKey(const Locale &loc) : fLoc(loc) {};
+ LocaleCacheKey(const Locale &loc) : fLoc(loc) {}
LocaleCacheKey(const LocaleCacheKey<T> &other)
: CacheKey<T>(other), fLoc(other.fLoc) { }
virtual ~LocaleCacheKey() { }
struct CSRecognizerInfo : public UMemory {
CSRecognizerInfo(CharsetRecognizer *recognizer, UBool isDefaultEnabled)
- : recognizer(recognizer), isDefaultEnabled(isDefaultEnabled) {};
+ : recognizer(recognizer), isDefaultEnabled(isDefaultEnabled) {}
- ~CSRecognizerInfo() {delete recognizer;};
+ ~CSRecognizerInfo() {delete recognizer;}
CharsetRecognizer *recognizer;
UBool isDefaultEnabled;
inline bool isUsingBytes() { return usingBytes; }
/** Visible for testing */
- inline bool isExplicitExactDouble() { return explicitExactDouble; };
+ inline bool isExplicitExactDouble() { return explicitExactDouble; }
bool operator==(const DecimalQuantity& other) const;
int32_t offset = 0;
explicit ParserState(const UnicodeString& _pattern)
- : pattern(_pattern) {};
+ : pattern(_pattern) {}
ParserState& operator=(ParserState&& src) U_NOEXCEPT {
// Leave pattern reference alone; it will continue to point to the same place in memory,
*/
virtual void postProcess(ParsedNumber&) const {
// Default implementation: no-op
- };
+ }
// String for debugging
virtual UnicodeString toString() const = 0;
~ScriptSet();
UBool operator == (const ScriptSet &other) const;
- UBool operator != (const ScriptSet &other) const {return !(*this == other);};
+ UBool operator != (const ScriptSet &other) const {return !(*this == other);}
ScriptSet & operator = (const ScriptSet &other);
UBool test(UScriptCode script, UErrorCode &status) const;
static TimeZoneGenericNames* createInstance(const Locale& locale, UErrorCode& status);
virtual UBool operator==(const TimeZoneGenericNames& other) const;
- virtual UBool operator!=(const TimeZoneGenericNames& other) const {return !operator==(other);};
+ virtual UBool operator!=(const TimeZoneGenericNames& other) const {return !operator==(other);}
virtual TimeZoneGenericNames* clone() const;
UnicodeString& getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type,
virtual ~TimeZoneNamesDelegate();
virtual UBool operator==(const TimeZoneNames& other) const;
- virtual UBool operator!=(const TimeZoneNames& other) const {return !operator==(other);};
+ virtual UBool operator!=(const TimeZoneNames& other) const {return !operator==(other);}
virtual TimeZoneNames* clone() const;
StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const;
/**
* No assignment.
*/
- AlphabeticIndex &operator =(const AlphabeticIndex & /*other*/) { return *this;};
+ AlphabeticIndex &operator =(const AlphabeticIndex & /*other*/) { return *this;}
/**
* No Equality operators.
* Default constructor; makes an empty FormattedDateInterval.
* @draft ICU 64
*/
- FormattedDateInterval() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {};
+ FormattedDateInterval() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
/**
* Move constructor: Leaves the source FormattedDateInterval in an undefined state.
*/
inline int32_t getCategory() const {
return fCategory;
- };
+ }
/**
* Gets the field for the current position.
*/
inline int32_t getField() const {
return fField;
- };
+ }
/**
* Gets the INCLUSIVE start index for the current position.
*/
inline int32_t getStart() const {
return fStart;
- };
+ }
/**
* Gets the EXCLUSIVE end index stored for the current position.
*/
inline int32_t getLimit() const {
return fLimit;
- };
+ }
////////////////////////////////////////////////////////////////////
//// The following methods are for FormattedValue implementers; ////
* Default constructor; makes an empty FormattedList.
* @draft ICU 64
*/
- FormattedList() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {};
+ FormattedList() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
/**
* Move constructor: Leaves the source FormattedList in an undefined state.
* @draft ICU 64
*/
FormattedNumber()
- : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {};
+ : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
/**
* Move constructor: Leaves the source FormattedNumber in an undefined state.
}
fMacros.copyErrorTo(outErrorCode);
return U_FAILURE(outErrorCode);
- };
+ }
// NOTE: Uses default copy and move constructors.
* Default constructor; makes an empty FormattedRelativeDateTime.
* @draft ICU 64
*/
- FormattedRelativeDateTime() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {};
+ FormattedRelativeDateTime() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}
/**
* Move constructor: Leaves the source FormattedRelativeDateTime in an undefined state.