use "std" namespace for "sprintf"

Some compilers don't export C compatibility functions in `::`. Using
`std::sprintf` should work for those (and all other compilers).

Reference: https://en.cppreference.com/w/cpp/header#C_compatibility_headers
This commit is contained in:
Girts Folkmanis 2019-02-13 21:06:41 +00:00 committed by Martin Hořeňovský
parent dbbab8727c
commit 711d750ca7

View File

@ -36,7 +36,7 @@ namespace Catch {
#ifdef _MSC_VER #ifdef _MSC_VER
sprintf_s(buffer, "%.3f", duration); sprintf_s(buffer, "%.3f", duration);
#else #else
sprintf(buffer, "%.3f", duration); std::sprintf(buffer, "%.3f", duration);
#endif #endif
return std::string(buffer); return std::string(buffer);
} }