@@ -232,14 +232,14 @@ int dumpAllButInstalledLocales(int lev,
232
232
int list (const char * toBundle) {
233
233
UErrorCode status = U_ZERO_ERROR;
234
234
235
- FILE* bf = NULL ; // NOLINT (readability/null_usage)
235
+ FILE* bf = nullptr ;
236
236
237
- if (toBundle != NULL ) { // NOLINT (readability/null_usage)
237
+ if (toBundle != nullptr ) {
238
238
if (VERBOSE) {
239
239
printf (" writing to bundle %s\n " , toBundle);
240
240
}
241
241
bf = fopen (toBundle, " wb" );
242
- if (bf == NULL ) { // NOLINT (readability/null_usage)
242
+ if (bf == nullptr ) {
243
243
printf (" ERROR: Could not open '%s' for writing.\n " , toBundle);
244
244
return 1 ;
245
245
}
@@ -260,15 +260,15 @@ int list(const char* toBundle) {
260
260
ASSERT_SUCCESS (&status, " while opening the bundle" );
261
261
icu::LocalUResourceBundlePointer installedLocales (
262
262
// NOLINTNEXTLINE (readability/null_usage)
263
- ures_getByKey (bund.getAlias (), INSTALLEDLOCALES, NULL , &status));
263
+ ures_getByKey (bund.getAlias (), INSTALLEDLOCALES, nullptr , &status));
264
264
ASSERT_SUCCESS (&status, " while fetching installed locales" );
265
265
266
266
int32_t count = ures_getSize (installedLocales.getAlias ());
267
267
if (VERBOSE) {
268
268
printf (" Locales: %d\n " , count);
269
269
}
270
270
271
- if (bf != NULL ) { // NOLINT (readability/null_usage)
271
+ if (bf != nullptr ) {
272
272
// write the HEADER
273
273
fprintf (bf,
274
274
" // NOTE: This file was generated during the build process.\n "
@@ -312,17 +312,17 @@ int list(const char* toBundle) {
312
312
313
313
UBool exists;
314
314
if (localeExists (key, &exists)) {
315
- if (bf != NULL ) fclose (bf); // NOLINT (readability/null_usage)
315
+ if (bf != nullptr ) fclose (bf);
316
316
return 1 ; // get out.
317
317
}
318
318
if (exists) {
319
319
validCount++;
320
320
printf (" %s\n " , key);
321
- if (bf != NULL ) { // NOLINT (readability/null_usage)
321
+ if (bf != nullptr ) {
322
322
fprintf (bf, " %s {\"\" }\n " , key);
323
323
}
324
324
} else {
325
- if (bf != NULL ) { // NOLINT (readability/null_usage)
325
+ if (bf != nullptr ) {
326
326
fprintf (bf, " // %s {\"\" }\n " , key);
327
327
}
328
328
if (VERBOSE) {
@@ -331,7 +331,7 @@ int list(const char* toBundle) {
331
331
}
332
332
}
333
333
334
- if (bf != NULL ) { // NOLINT (readability/null_usage)
334
+ if (bf != nullptr ) {
335
335
fprintf (bf, " } // %d/%d valid\n " , validCount, count);
336
336
// write the HEADER
337
337
fprintf (bf, " }\n " );
@@ -373,7 +373,7 @@ int main(int argc, const char* argv[]) {
373
373
usage ();
374
374
return 0 ;
375
375
} else if (!strcmp (arg, " -l" )) {
376
- if (list (NULL )) { // NOLINT (readability/null_usage)
376
+ if (list (nullptr )) {
377
377
return 1 ;
378
378
}
379
379
} else if (!strcmp (arg, " -b" ) && (argsLeft >= 1 )) {
0 commit comments