mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
@@ -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)
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user