From d68c7f8ea7d7f49d241d890111be44524097d56c Mon Sep 17 00:00:00 2001 From: R4SAS Date: Wed, 18 Jan 2023 08:19:45 +0300 Subject: [PATCH] [i18n] fix build on macos Signed-off-by: R4SAS --- i18n/I18N.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n/I18N.h b/i18n/I18N.h index 2489ddcf..4217a384 100644 --- a/i18n/I18N.h +++ b/i18n/I18N.h @@ -94,10 +94,10 @@ std::string tr (TValue&& arg, TArgs&&... args) { std::string tr_str = i2p::i18n::translate(std::forward(arg)); - size_t size = snprintf(NULL, 0, tr_str.c_str(), std::forward(args)...); + size_t size = std::snprintf(NULL, 0, tr_str.c_str(), std::forward(args)...); size = size + 1; std::string str(size, 0); - snprintf(str.data(), size, tr_str.c_str(), std::forward(args)...); + std::snprintf(str.data(), size, tr_str.c_str(), std::forward(args)...); return str; } @@ -126,10 +126,10 @@ std::string ntr (TValue&& arg, TValue2&& arg2, int& n, TArgs&&... args) { std::string tr_str = i2p::i18n::translate(std::forward(arg), std::forward(arg2), std::forward(n)); - size_t size = snprintf(NULL, 0, tr_str.c_str(), std::forward(args)...); + size_t size = std::snprintf(NULL, 0, tr_str.c_str(), std::forward(args)...); size = size + 1; std::string str(size, 0); - snprintf(str.data(), size, tr_str.c_str(), std::forward(args)...); + std::snprintf(str.data(), size, tr_str.c_str(), std::forward(args)...); return str; }