Skip to content

Commit b6dcc95

Browse files
committed
ICU-21833 remove redundant void parameter lists
See unicode-org#2351
1 parent 79ab90b commit b6dcc95

File tree

254 files changed

+1820
-1820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+1820
-1820
lines changed

docs/userguide/locale/resources.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ accessed using indexes and by iteration.
335335
In order to be able to distinguish between resources, one needs to know the type
336336
of the resource at hand. To find this out, use the
337337
`UResType ures_getType(UResourceBundle* resourceBundle)` API, or the C++ analog
338-
`UResType getType(void)`. The `UResType` is an enumeration defined in the
338+
`UResType getType()`. The `UResType` is an enumeration defined in the
339339
[unicode/ures.h](https://github.com/unicode-org/icu/blob/main/icu4c/source/common/unicode/ures.h)
340340
header file.
341341
@@ -443,8 +443,8 @@ ures_close(currentZone);
443443
...
444444
```
445445

446-
C++ provides analogous APIs: `ResourceBundle getNext(UErrorCode& status)`, `void resetIterator(void)`
447-
and `UBool hasNext(void)`.
446+
C++ provides analogous APIs: `ResourceBundle getNext(UErrorCode& status)`, `void resetIterator()`
447+
and `UBool hasNext()`.
448448

449449
#### Accessing Data in the Simple Resources
450450

@@ -540,22 +540,22 @@ following tables.
540540
| Language | API |
541541
| -------- | ------------------------------------------------------- |
542542
| C | `int32_t ures_getSize(UResourceBundle* resourceBundle)` |
543-
| C++ | `int32_t getSize(void) const` |
543+
| C++ | `int32_t getSize() const` |
544544
545545
Gets the number of items in a resource. Simple resources always return size 1.
546546
547547
| Language | API |
548548
| -------- | -------------------------------------------------------- |
549549
| C | `UResType ures_getType(UResourceBundle* resourceBundle)` |
550-
| C++ | `UResType getType(void)` |
550+
| C++ | `UResType getType()` |
551551
552552
Gets the type of the resource. For a list of resource types, see:
553553
[unicode/ures.h](https://github.com/unicode-org/icu/blob/main/icu4c/source/common/unicode/ures.h)
554554
555555
| Language | API |
556556
| -------- | ------------------------------------------------ |
557557
| C | `const char* ures_getKey(UResourceBundle* resB)` |
558-
| C++ | `const char* getKey(void)` |
558+
| C++ | `const char* getKey()` |
559559
560560
Gets the key of a named resource or `NULL` if this resource is a member of an
561561
array.
@@ -570,7 +570,7 @@ Fills out the version structure for this resource.
570570
| Language | API |
571571
| -------- | --------------------------------------------------------------------------------------- |
572572
| C | `const char* ures_getLocale(const UResourceBundle* resourceBundle, UErrorCode* status)` |
573-
| C++ | `const Locale& getLocale(void) const` |
573+
| C++ | `const Locale& getLocale() const` |
574574
575575
Returns the locale this resource is from. This API is going to change, so stay
576576
tuned.

icu4c/source/common/brkiter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static icu::ICULocaleService* gService = nullptr;
288288
* Release all static memory held by breakiterator.
289289
*/
290290
U_CDECL_BEGIN
291-
static UBool U_CALLCONV breakiterator_cleanup(void) {
291+
static UBool U_CALLCONV breakiterator_cleanup() {
292292
#if !UCONFIG_NO_SERVICE
293293
if (gService) {
294294
delete gService;
@@ -302,13 +302,13 @@ U_CDECL_END
302302
U_NAMESPACE_BEGIN
303303

304304
static void U_CALLCONV
305-
initService(void) {
305+
initService() {
306306
gService = new ICUBreakIteratorService();
307307
ucln_common_registerCleanup(UCLN_COMMON_BREAKITERATOR, breakiterator_cleanup);
308308
}
309309

310310
static ICULocaleService*
311-
getService(void)
311+
getService()
312312
{
313313
umtx_initOnce(gInitOnceBrkiter, &initService);
314314
return gService;
@@ -318,7 +318,7 @@ getService(void)
318318
// -------------------------------------
319319

320320
static inline UBool
321-
hasService(void)
321+
hasService()
322322
{
323323
return !gInitOnceBrkiter.isReset() && getService() != nullptr;
324324
}
@@ -353,7 +353,7 @@ BreakIterator::unregister(URegistryKey key, UErrorCode& status)
353353
// -------------------------------------
354354

355355
StringEnumeration* U_EXPORT2
356-
BreakIterator::getAvailableLocales(void)
356+
BreakIterator::getAvailableLocales()
357357
{
358358
ICULocaleService *service = getService();
359359
if (service == nullptr) {

icu4c/source/common/chariter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ CharacterIterator::operator=(const CharacterIterator &that) {
8686
// implementing first[32]PostInc() directly in a subclass should be faster
8787
// but these implementations make subclassing a little easier
8888
char16_t
89-
CharacterIterator::firstPostInc(void) {
89+
CharacterIterator::firstPostInc() {
9090
setToStart();
9191
return nextPostInc();
9292
}
9393

9494
UChar32
95-
CharacterIterator::first32PostInc(void) {
95+
CharacterIterator::first32PostInc() {
9696
setToStart();
9797
return next32PostInc();
9898
}

icu4c/source/common/cmemory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMem
129129
}
130130

131131

132-
U_CFUNC UBool cmemory_cleanup(void) {
132+
U_CFUNC UBool cmemory_cleanup() {
133133
pContext = nullptr;
134134
pAlloc = nullptr;
135135
pRealloc = nullptr;

icu4c/source/common/filteredbrk.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class SimpleFilteredSentenceBreakIterator : public BreakIterator {
191191
return clone();
192192
}
193193
virtual SimpleFilteredSentenceBreakIterator* clone() const override { return new SimpleFilteredSentenceBreakIterator(*this); }
194-
virtual UClassID getDynamicClassID(void) const override { return nullptr; }
194+
virtual UClassID getDynamicClassID() const override { return nullptr; }
195195
virtual bool operator==(const BreakIterator& o) const override { if(this==&o) return true; return false; }
196196

197197
/* -- text modifying -- */
@@ -202,20 +202,20 @@ class SimpleFilteredSentenceBreakIterator : public BreakIterator {
202202

203203
/* -- other functions that are just delegated -- */
204204
virtual UText *getUText(UText *fillIn, UErrorCode &status) const override { return fDelegate->getUText(fillIn,status); }
205-
virtual CharacterIterator& getText(void) const override { return fDelegate->getText(); }
205+
virtual CharacterIterator& getText() const override { return fDelegate->getText(); }
206206

207207
/* -- ITERATION -- */
208-
virtual int32_t first(void) override;
208+
virtual int32_t first() override;
209209
virtual int32_t preceding(int32_t offset) override;
210-
virtual int32_t previous(void) override;
210+
virtual int32_t previous() override;
211211
virtual UBool isBoundary(int32_t offset) override;
212-
virtual int32_t current(void) const override { return fDelegate->current(); } // we keep the delegate current, so this should be correct.
212+
virtual int32_t current() const override { return fDelegate->current(); } // we keep the delegate current, so this should be correct.
213213

214-
virtual int32_t next(void) override;
214+
virtual int32_t next() override;
215215

216216
virtual int32_t next(int32_t n) override;
217217
virtual int32_t following(int32_t offset) override;
218-
virtual int32_t last(void) override;
218+
virtual int32_t last() override;
219219

220220
private:
221221
/**
@@ -428,7 +428,7 @@ SimpleFilteredSentenceBreakIterator::next() {
428428
}
429429

430430
int32_t
431-
SimpleFilteredSentenceBreakIterator::first(void) {
431+
SimpleFilteredSentenceBreakIterator::first() {
432432
// Don't suppress a break opportunity at the beginning of text.
433433
return fDelegate->first();
434434
}
@@ -439,7 +439,7 @@ SimpleFilteredSentenceBreakIterator::preceding(int32_t offset) {
439439
}
440440

441441
int32_t
442-
SimpleFilteredSentenceBreakIterator::previous(void) {
442+
SimpleFilteredSentenceBreakIterator::previous() {
443443
return internalPrev(fDelegate->previous());
444444
}
445445

@@ -473,7 +473,7 @@ SimpleFilteredSentenceBreakIterator::following(int32_t offset) {
473473
}
474474

475475
int32_t
476-
SimpleFilteredSentenceBreakIterator::last(void) {
476+
SimpleFilteredSentenceBreakIterator::last() {
477477
// Don't suppress a break opportunity at the end of text.
478478
return fDelegate->last();
479479
}

icu4c/source/common/hash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class U_COMMON_API Hashtable : public UMemory {
9797

9898
inline int32_t removei(const UnicodeString& key);
9999

100-
inline void removeAll(void);
100+
inline void removeAll();
101101

102102
inline UBool containsKey(const UnicodeString& key) const;
103103

@@ -246,7 +246,7 @@ inline const UHashElement* Hashtable::nextElement(int32_t& pos) const {
246246
return uhash_nextElement(hash, &pos);
247247
}
248248

249-
inline void Hashtable::removeAll(void) {
249+
inline void Hashtable::removeAll() {
250250
uhash_removeAll(hash);
251251
}
252252

icu4c/source/common/icuplug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ U_CAPI UPlugLevel U_EXPORT2 uplug_getCurrentLevel() {
632632
return gCurrentLevel;
633633
}
634634

635-
static UBool U_CALLCONV uplug_cleanup(void)
635+
static UBool U_CALLCONV uplug_cleanup()
636636
{
637637
int32_t i;
638638

icu4c/source/common/locavailable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ U_NAMESPACE_END
4343

4444
U_CDECL_BEGIN
4545

46-
static UBool U_CALLCONV locale_available_cleanup(void)
46+
static UBool U_CALLCONV locale_available_cleanup()
4747
{
4848
U_NAMESPACE_USE
4949

@@ -196,7 +196,7 @@ class AvailableLocalesStringEnumeration : public StringEnumeration {
196196

197197
/* ### Get available **************************************************/
198198

199-
static UBool U_CALLCONV uloc_cleanup(void) {
199+
static UBool U_CALLCONV uloc_cleanup() {
200200
for (int32_t i = 0; i < UPRV_LENGTHOF(gAvailableLocaleNames); i++) {
201201
uprv_free(gAvailableLocaleNames[i]);
202202
gAvailableLocaleNames[i] = nullptr;

icu4c/source/common/locdspnm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ class LocaleDisplayNamesImpl : public LocaleDisplayNames {
347347
UnicodeString& keyDisplayName(const char* key, UnicodeString& result, UBool skipAdjust) const;
348348
UnicodeString& keyValueDisplayName(const char* key, const char* value,
349349
UnicodeString& result, UBool skipAdjust) const;
350-
void initialize(void);
350+
void initialize();
351351

352352
struct CapitalizationContextSink;
353353
};
@@ -447,7 +447,7 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink {
447447
LocaleDisplayNamesImpl::CapitalizationContextSink::~CapitalizationContextSink() {}
448448

449449
void
450-
LocaleDisplayNamesImpl::initialize(void) {
450+
LocaleDisplayNamesImpl::initialize() {
451451
LocaleDisplayNamesImpl *nonConstThis = (LocaleDisplayNamesImpl *)this;
452452
nonConstThis->locale = langData.getLocale() == Locale::getRoot()
453453
? regionData.getLocale()

0 commit comments

Comments
 (0)