diff options
author | romankoshelev <romankoshelev@yandex-team.com> | 2023-08-14 19:51:50 +0300 |
---|---|---|
committer | romankoshelev <romankoshelev@yandex-team.com> | 2023-08-15 01:24:11 +0300 |
commit | cfcd865e05c0d0525ea27d1e153a043b32a85138 (patch) | |
tree | 68d3b3b25271e8a4998505897a269ff7ce119b76 /contrib/libs/icu/common/ures_cnv.cpp | |
parent | ccb790c507bd5e8ffe2ef9886ce5ee0a7ce22a15 (diff) | |
download | ydb-cfcd865e05c0d0525ea27d1e153a043b32a85138.tar.gz |
Update ICU to 73.2
Diffstat (limited to 'contrib/libs/icu/common/ures_cnv.cpp')
-rw-r--r-- | contrib/libs/icu/common/ures_cnv.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/libs/icu/common/ures_cnv.cpp b/contrib/libs/icu/common/ures_cnv.cpp index 1aa58e753c..0a2b1e912c 100644 --- a/contrib/libs/icu/common/ures_cnv.cpp +++ b/contrib/libs/icu/common/ures_cnv.cpp @@ -27,7 +27,7 @@ #include "ustr_cnv.h" U_CAPI UResourceBundle * U_EXPORT2 -ures_openU(const UChar *myPath, +ures_openU(const char16_t *myPath, const char *localeID, UErrorCode *status) { @@ -35,17 +35,17 @@ ures_openU(const UChar *myPath, int32_t length; char *path = pathBuffer; - if(status==NULL || U_FAILURE(*status)) { - return NULL; + if(status==nullptr || U_FAILURE(*status)) { + return nullptr; } - if(myPath==NULL) { - path = NULL; + if(myPath==nullptr) { + path = nullptr; } else { length=u_strlen(myPath); if(length>=(int32_t)sizeof(pathBuffer)) { *status=U_ILLEGAL_ARGUMENT_ERROR; - return NULL; + return nullptr; } else if(uprv_isInvariantUString(myPath, length)) { /* * the invariant converter is sufficient for package and tree names @@ -59,17 +59,17 @@ ures_openU(const UChar *myPath, length=ucnv_fromUChars(cnv, path, (int32_t)sizeof(pathBuffer), myPath, length, status); u_releaseDefaultConverter(cnv); if(U_FAILURE(*status)) { - return NULL; + return nullptr; } if(length>=(int32_t)sizeof(pathBuffer)) { /* not NUL-terminated - path too long */ *status=U_ILLEGAL_ARGUMENT_ERROR; - return NULL; + return nullptr; } #else /* the default converter is not available */ *status=U_UNSUPPORTED_ERROR; - return NULL; + return nullptr; #endif } } |