diff --git a/icu4c/source/i18n/datefmt.cpp b/icu4c/source/i18n/datefmt.cpp index b25312463e0..f653483b3f5 100644 --- a/icu4c/source/i18n/datefmt.cpp +++ b/icu4c/source/i18n/datefmt.cpp @@ -561,7 +561,7 @@ DateFormat::create(EStyle timeStyle, EStyle dateStyle, const Locale& locale) // This should never really happen, because the preceding constructor // should always succeed. If the resource data is unavailable, a last // resort object should be returned. - return 0; + return nullptr; } //---------------------------------------------------------------------- diff --git a/icu4c/source/i18n/udat.cpp b/icu4c/source/i18n/udat.cpp index e249be3aee9..439721bb9f0 100644 --- a/icu4c/source/i18n/udat.cpp +++ b/icu4c/source/i18n/udat.cpp @@ -142,7 +142,7 @@ udat_open(UDateFormatStyle timeStyle, { DateFormat *fmt; if(U_FAILURE(*status)) { - return 0; + return nullptr; } if(gOpener!=nullptr) { // if it's registered fmt = (DateFormat*) (*gOpener)(timeStyle,dateStyle,locale,tzID,tzIDLength,pattern,patternLength,status); @@ -186,7 +186,7 @@ udat_open(UDateFormatStyle timeStyle, if(zone == 0) { *status = U_MEMORY_ALLOCATION_ERROR; delete fmt; - return 0; + return nullptr; } fmt->adoptTimeZone(zone); }