Skip to content

Commit

Permalink
[i18n] fix build on macos
Browse files Browse the repository at this point in the history
Signed-off-by: R4SAS <r4sas@i2pmail.org>
  • Loading branch information
r4sas committed Jan 18, 2023
1 parent d68c7f8 commit 88dfe3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions i18n/I18N.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 88dfe3c

Please sign in to comment.