Browse Source

[i18n] fix build on macos

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1854/head
R4SAS 2 years ago
parent
commit
88dfe3ca4e
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 4
      i18n/I18N.h

4
i18n/I18N.h

@ -97,7 +97,7 @@ std::string tr (TValue&& arg, TArgs&&... args) @@ -97,7 +97,7 @@ std::string tr (TValue&& arg, TArgs&&... args)
size_t size = std::snprintf(NULL, 0, tr_str.c_str(), std::forward<TArgs>(args)...);
size = size + 1;
std::string str(size, 0);
std::snprintf(str.data(), size, tr_str.c_str(), std::forward<TArgs>(args)...);
std::snprintf(&str.front(), size, tr_str.c_str(), std::forward<TArgs>(args)...);
return str;
}
@ -129,7 +129,7 @@ std::string ntr (TValue&& arg, TValue2&& arg2, int& n, TArgs&&... args) @@ -129,7 +129,7 @@ std::string ntr (TValue&& arg, TValue2&& arg2, int& n, TArgs&&... args)
size_t size = std::snprintf(NULL, 0, tr_str.c_str(), std::forward<TArgs>(args)...);
size = size + 1;
std::string str(size, 0);
std::snprintf(str.data(), size, tr_str.c_str(), std::forward<TArgs>(args)...);
std::snprintf(&str.front(), size, tr_str.c_str(), std::forward<TArgs>(args)...);
return str;
}

Loading…
Cancel
Save