Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1be566b

Browse filesBrowse files
juanarboltargos
authored andcommitted
tools: replace NULL with nullptr
PR-URL: #25179 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 2df0d14 commit 1be566b
Copy full SHA for 1be566b

File tree

Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Collapse file

‎tools/icu/iculslocs.cc‎

Copy file name to clipboardExpand all lines: tools/icu/iculslocs.cc
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ int dumpAllButInstalledLocales(int lev,
232232
int list(const char* toBundle) {
233233
UErrorCode status = U_ZERO_ERROR;
234234

235-
FILE* bf = NULL; // NOLINT (readability/null_usage)
235+
FILE* bf = nullptr;
236236

237-
if (toBundle != NULL) { // NOLINT (readability/null_usage)
237+
if (toBundle != nullptr) {
238238
if (VERBOSE) {
239239
printf("writing to bundle %s\n", toBundle);
240240
}
241241
bf = fopen(toBundle, "wb");
242-
if (bf == NULL) { // NOLINT (readability/null_usage)
242+
if (bf == nullptr) {
243243
printf("ERROR: Could not open '%s' for writing.\n", toBundle);
244244
return 1;
245245
}
@@ -260,15 +260,15 @@ int list(const char* toBundle) {
260260
ASSERT_SUCCESS(&status, "while opening the bundle");
261261
icu::LocalUResourceBundlePointer installedLocales(
262262
// NOLINTNEXTLINE (readability/null_usage)
263-
ures_getByKey(bund.getAlias(), INSTALLEDLOCALES, NULL, &status));
263+
ures_getByKey(bund.getAlias(), INSTALLEDLOCALES, nullptr, &status));
264264
ASSERT_SUCCESS(&status, "while fetching installed locales");
265265

266266
int32_t count = ures_getSize(installedLocales.getAlias());
267267
if (VERBOSE) {
268268
printf("Locales: %d\n", count);
269269
}
270270

271-
if (bf != NULL) { // NOLINT (readability/null_usage)
271+
if (bf != nullptr) {
272272
// write the HEADER
273273
fprintf(bf,
274274
"// NOTE: This file was generated during the build process.\n"
@@ -312,17 +312,17 @@ int list(const char* toBundle) {
312312

313313
UBool exists;
314314
if (localeExists(key, &exists)) {
315-
if (bf != NULL) fclose(bf); // NOLINT (readability/null_usage)
315+
if (bf != nullptr) fclose(bf);
316316
return 1; // get out.
317317
}
318318
if (exists) {
319319
validCount++;
320320
printf("%s\n", key);
321-
if (bf != NULL) { // NOLINT (readability/null_usage)
321+
if (bf != nullptr) {
322322
fprintf(bf, " %s {\"\"}\n", key);
323323
}
324324
} else {
325-
if (bf != NULL) { // NOLINT (readability/null_usage)
325+
if (bf != nullptr) {
326326
fprintf(bf, "// %s {\"\"}\n", key);
327327
}
328328
if (VERBOSE) {
@@ -331,7 +331,7 @@ int list(const char* toBundle) {
331331
}
332332
}
333333

334-
if (bf != NULL) { // NOLINT (readability/null_usage)
334+
if (bf != nullptr) {
335335
fprintf(bf, " } // %d/%d valid\n", validCount, count);
336336
// write the HEADER
337337
fprintf(bf, "}\n");
@@ -373,7 +373,7 @@ int main(int argc, const char* argv[]) {
373373
usage();
374374
return 0;
375375
} else if (!strcmp(arg, "-l")) {
376-
if (list(NULL)) { // NOLINT (readability/null_usage)
376+
if (list(nullptr)) {
377377
return 1;
378378
}
379379
} else if (!strcmp(arg, "-b") && (argsLeft >= 1)) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.