mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-26 16:51:24 +00:00
update interfaces/cj/intl/src/intl_impl.cpp.
Signed-off-by: 小城茶语 <guorunzhi@huawei.com>
This commit is contained in:
parent
b1f587cc96
commit
7fbddcbd49
@ -266,7 +266,7 @@ CArrArrString RelativeTimeFormatImpl::FormatToParts(double number, char *unit)
|
|||||||
for (size_t i = 0; i < timeVectorStr.size(); i++) {
|
for (size_t i = 0; i < timeVectorStr.size(); i++) {
|
||||||
std::vector<std::string> timeVector = timeVectorStr[i];
|
std::vector<std::string> timeVector = timeVectorStr[i];
|
||||||
CArrString retime = {.head = nullptr, .size = 0};
|
CArrString retime = {.head = nullptr, .size = 0};
|
||||||
char **time = reinterpret_cast<char **>(malloc(sizeof(char *) * timeVector.size()));
|
char **time = static_cast<char **>(malloc(sizeof(char *) * timeVector.size()));
|
||||||
if (time == nullptr) {
|
if (time == nullptr) {
|
||||||
HILOG_ERROR_I18N("The char** is nullptr");
|
HILOG_ERROR_I18N("The char** is nullptr");
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user