From 88dfe3ca4ea3273917badf4b5e28cd93b1348bc5 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Wed, 18 Jan 2023 18:56:21 +0300 Subject: [PATCH] [i18n] fix build on macos Signed-off-by: R4SAS --- i18n/I18N.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/I18N.h b/i18n/I18N.h index 4217a384..9b413222 100644 --- a/i18n/I18N.h +++ b/i18n/I18N.h @@ -97,7 +97,7 @@ std::string tr (TValue&& arg, TArgs&&... args) size_t size = std::snprintf(NULL, 0, tr_str.c_str(), std::forward(args)...); size = size + 1; std::string str(size, 0); - std::snprintf(str.data(), size, tr_str.c_str(), std::forward(args)...); + std::snprintf(&str.front(), size, tr_str.c_str(), std::forward(args)...); return str; } @@ -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(args)...); size = size + 1; std::string str(size, 0); - std::snprintf(str.data(), size, tr_str.c_str(), std::forward(args)...); + std::snprintf(&str.front(), size, tr_str.c_str(), std::forward(args)...); return str; }