Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-22532 Remove redundant 'void' from empty C++ parameter lists #2745

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions icu4c/source/common/unicode/brkiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,13 @@ class U_COMMON_API BreakIterator : public UObject {
* will return distinct unequal values.
* @stable ICU 2.0
*/
virtual UClassID getDynamicClassID(void) const override = 0;
virtual UClassID getDynamicClassID() const override = 0;

/**
* Return a CharacterIterator over the text being analyzed.
* @stable ICU 2.0
*/
virtual CharacterIterator& getText(void) const = 0;

virtual CharacterIterator& getText() const = 0;

/**
* Get a UText for the text being analyzed.
Expand Down Expand Up @@ -228,37 +227,37 @@ class U_COMMON_API BreakIterator : public UObject {
* @return The offset of the beginning of the text, zero.
* @stable ICU 2.0
*/
virtual int32_t first(void) = 0;
virtual int32_t first() = 0;

/**
* Set the iterator position to the index immediately BEYOND the last character in the text being scanned.
* @return The index immediately BEYOND the last character in the text being scanned.
* @stable ICU 2.0
*/
virtual int32_t last(void) = 0;
virtual int32_t last() = 0;

/**
* Set the iterator position to the boundary preceding the current boundary.
* @return The character index of the previous text boundary or DONE if all
* boundaries have been returned.
* @stable ICU 2.0
*/
virtual int32_t previous(void) = 0;
virtual int32_t previous() = 0;

/**
* Advance the iterator to the boundary following the current boundary.
* @return The character index of the next text boundary or DONE if all
* boundaries have been returned.
* @stable ICU 2.0
*/
virtual int32_t next(void) = 0;
virtual int32_t next() = 0;

/**
* Return character index of the current iterator position within the text.
* @return The boundary most recently returned.
* @stable ICU 2.0
*/
virtual int32_t current(void) const = 0;
virtual int32_t current() const = 0;

/**
* Advance the iterator to the first boundary following the specified offset.
Expand Down Expand Up @@ -530,7 +529,7 @@ class U_COMMON_API BreakIterator : public UObject {
* must be closed by an explicit call to the destructor (not delete).
* @deprecated ICU 52. Always delete the BreakIterator.
*/
inline UBool isBufferClone(void);
inline UBool isBufferClone();

#endif /* U_HIDE_DEPRECATED_API */

Expand Down Expand Up @@ -575,7 +574,7 @@ class U_COMMON_API BreakIterator : public UObject {
* @return a StringEnumeration over the locales available at the time of the call
* @stable ICU 2.4
*/
static StringEnumeration* U_EXPORT2 getAvailableLocales(void);
static StringEnumeration* U_EXPORT2 getAvailableLocales();
#endif

/**
Expand Down
68 changes: 34 additions & 34 deletions icu4c/source/common/unicode/chariter.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ class U_COMMON_API ForwardCharacterIterator : public UObject {
* @return the hash code.
* @stable ICU 2.0
*/
virtual int32_t hashCode(void) const = 0;
virtual int32_t hashCode() const = 0;

/**
* Returns a UClassID for this ForwardCharacterIterator ("poor man's
* RTTI").<P> Despite the fact that this function is public,
* DO NOT CONSIDER IT PART OF CHARACTERITERATOR'S API!
* @return a UClassID for this ForwardCharacterIterator
* @stable ICU 2.0
*/
virtual UClassID getDynamicClassID(void) const override = 0;
virtual UClassID getDynamicClassID() const override = 0;

/**
* Gets the current code unit for returning and advances to the next code unit
* in the iteration range
Expand All @@ -152,8 +152,8 @@ class U_COMMON_API ForwardCharacterIterator : public UObject {
* @return the current code unit.
* @stable ICU 2.0
*/
virtual char16_t nextPostInc(void) = 0;
virtual char16_t nextPostInc() = 0;

/**
* Gets the current code point for returning and advances to the next code point
* in the iteration range
Expand All @@ -162,8 +162,8 @@ class U_COMMON_API ForwardCharacterIterator : public UObject {
* @return the current code point.
* @stable ICU 2.0
*/
virtual UChar32 next32PostInc(void) = 0;
virtual UChar32 next32PostInc() = 0;

/**
* Returns false if there are no more code units or code points
* at or after the current position in the iteration range.
Expand Down Expand Up @@ -389,7 +389,7 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the first code unit in its iteration range.
* @stable ICU 2.0
*/
virtual char16_t first(void) = 0;
virtual char16_t first() = 0;

/**
* Sets the iterator to refer to the first code unit in its
Expand All @@ -399,7 +399,7 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the first code unit in its iteration range.
* @stable ICU 2.0
*/
virtual char16_t firstPostInc(void);
virtual char16_t firstPostInc();

/**
* Sets the iterator to refer to the first code point in its
Expand All @@ -410,7 +410,7 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the first code point in its iteration range.
* @stable ICU 2.0
*/
virtual UChar32 first32(void) = 0;
virtual UChar32 first32() = 0;

/**
* Sets the iterator to refer to the first code point in its
Expand All @@ -420,7 +420,7 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the first code point in its iteration range.
* @stable ICU 2.0
*/
virtual UChar32 first32PostInc(void);
virtual UChar32 first32PostInc();

/**
* Sets the iterator to refer to the first code unit or code point in its
Expand All @@ -438,16 +438,16 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the last code unit.
* @stable ICU 2.0
*/
virtual char16_t last(void) = 0;
virtual char16_t last() = 0;

/**
* Sets the iterator to refer to the last code point in its
* iteration range, and returns that code unit.
* This can be used to begin an iteration with previous32().
* @return the last code point.
* @stable ICU 2.0
*/
virtual UChar32 last32(void) = 0;
virtual UChar32 last32() = 0;

/**
* Sets the iterator to the end of its iteration range, just behind
Expand Down Expand Up @@ -486,24 +486,24 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the current code unit.
* @stable ICU 2.0
*/
virtual char16_t current(void) const = 0;
virtual char16_t current() const = 0;

/**
* Returns the code point the iterator currently refers to.
* @return the current code point.
* @stable ICU 2.0
*/
virtual UChar32 current32(void) const = 0;
virtual UChar32 current32() const = 0;

/**
* Advances to the next code unit in the iteration range
* (toward endIndex()), and returns that code unit. If there are
* no more code units to return, returns DONE.
* @return the next code unit.
* @stable ICU 2.0
*/
virtual char16_t next(void) = 0;
virtual char16_t next() = 0;

/**
* Advances to the next code point in the iteration range
* (toward endIndex()), and returns that code point. If there are
Expand All @@ -514,16 +514,16 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the next code point.
* @stable ICU 2.0
*/
virtual UChar32 next32(void) = 0;
virtual UChar32 next32() = 0;

/**
* Advances to the previous code unit in the iteration range
* (toward startIndex()), and returns that code unit. If there are
* no more code units to return, returns DONE.
* @return the previous code unit.
* @stable ICU 2.0
*/
virtual char16_t previous(void) = 0;
virtual char16_t previous() = 0;

/**
* Advances to the previous code point in the iteration range
Expand All @@ -532,7 +532,7 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* @return the previous code point.
* @stable ICU 2.0
*/
virtual UChar32 previous32(void) = 0;
virtual UChar32 previous32() = 0;

/**
* Returns false if there are no more code units or code points
Expand All @@ -555,8 +555,8 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* object of the character returned by first().
* @stable ICU 2.0
*/
inline int32_t startIndex(void) const;
inline int32_t startIndex() const;

/**
* Returns the numeric index in the underlying text-storage
* object of the position immediately BEYOND the character
Expand All @@ -566,8 +566,8 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* returned by last().
* @stable ICU 2.0
*/
inline int32_t endIndex(void) const;
inline int32_t endIndex() const;

/**
* Returns the numeric index in the underlying text-storage
* object of the character the iterator currently refers to
Expand All @@ -576,7 +576,7 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
* the character the iterator currently refers to
* @stable ICU 2.0
*/
inline int32_t getIndex(void) const;
inline int32_t getIndex() const;

/**
* Returns the length of the entire text in the underlying
Expand Down Expand Up @@ -708,22 +708,22 @@ CharacterIterator::setToEnd() {
}

inline int32_t
CharacterIterator::startIndex(void) const {
CharacterIterator::startIndex() const {
return begin;
}

inline int32_t
CharacterIterator::endIndex(void) const {
CharacterIterator::endIndex() const {
return end;
}

inline int32_t
CharacterIterator::getIndex(void) const {
CharacterIterator::getIndex() const {
return pos;
}

inline int32_t
CharacterIterator::getLength(void) const {
CharacterIterator::getLength() const {
return textLength;
}

Expand Down
5 changes: 2 additions & 3 deletions icu4c/source/common/unicode/dtintrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class U_COMMON_API DateInterval : public UObject {
* @return The class ID for all objects of this class.
* @stable ICU 4.0
*/
static UClassID U_EXPORT2 getStaticClassID(void);
static UClassID U_EXPORT2 getStaticClassID();

/**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
Expand All @@ -89,9 +89,8 @@ class U_COMMON_API DateInterval : public UObject {
* other classes have different class IDs.
* @stable ICU 4.0
*/
virtual UClassID getDynamicClassID(void) const override;
virtual UClassID getDynamicClassID() const override;


/**
* Copy constructor.
* @stable ICU 4.0
Expand Down
Loading
Loading