1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Fix build on windows

This commit is contained in:
Mathieu Schroeter 2017-03-21 18:34:26 +01:00
parent 6c6163f5d9
commit 89b1070dbe

View File

@ -25,6 +25,6 @@ string_format (const std::string &format, Args ...args)
{
size_t size = snprintf (nullptr, 0, format.c_str (), args...) + 1;
std::unique_ptr<char[]> buf (new char[size]);
std::snprintf (buf.get(), size, format.c_str (), args...);
snprintf (buf.get(), size, format.c_str (), args...);
return std::string (buf.get (), buf.get () + size - 1);
}