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
1 changed files with 1 additions and 1 deletions

View File

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