Use PUGI__MSVC_CRT_VERSION instead of _MSC_VER
It's not clear whether we still need PUGI__MSVC_CRT_VERSION, but it's more consistent for now to use it for _snprintf_s since this is relying on a CRT extension, not on a compiler feature.
This commit is contained in:
parent
2252927c04
commit
853333cd70
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ using std::memset;
|
|||
// Not all platforms have snprintf; we define a wrapper that uses snprintf if possible. This only works with buffers with a known size.
|
||||
#if __cplusplus >= 201103
|
||||
# define PUGI__SNPRINTF(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__)
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
#elif defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400
|
||||
# define PUGI__SNPRINTF(buf, ...) _snprintf_s(buf, _countof(buf), _TRUNCATE, __VA_ARGS__)
|
||||
#else
|
||||
# define PUGI__SNPRINTF sprintf
|
||||
|
|
Loading…
Add table
Reference in a new issue