mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Fixed ticket 123, Visual C++ warnings
This commit is contained in:
parent
64f9e3564d
commit
5f4a5b62f4
@ -15,7 +15,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER std::string format(const char* msg, ...)
|
||||
{
|
||||
const int STRING_BUFFER = 4096;
|
||||
std::size_t const STRING_BUFFER(4096);
|
||||
char text[STRING_BUFFER];
|
||||
va_list list;
|
||||
|
||||
@ -23,7 +23,12 @@ namespace detail
|
||||
return std::string();
|
||||
|
||||
va_start(list, msg);
|
||||
// Ticket #123
|
||||
#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER_VC >= GLM_COMPILER_VC2005))
|
||||
vsprintf_s(text, msg, list, STRING_BUFFER);
|
||||
#else//
|
||||
vsprintf(text, msg, list);
|
||||
#endif//
|
||||
va_end(list);
|
||||
|
||||
return std::string(text);
|
||||
|
Loading…
Reference in New Issue
Block a user