"vscode:/vscode.git/clone" did not exist on "3351eba0aa33668f8f4cf5d24eb5f68fce17e034"
Commit 3a99ab6d authored by Tom Hughes's avatar Tom Hughes Committed by Copybara-Service
Browse files

Fix _MSC_VER check

Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent with other usages in the file and to work with the "-Wundef" warning.

PiperOrigin-RevId: 499471290
Change-Id: I34a9442eecf266afd74d4332cab7d39766df4ed9
parent 71140c3c
...@@ -2142,7 +2142,7 @@ GTEST_DISABLE_MSC_DEPRECATED_POP_() ...@@ -2142,7 +2142,7 @@ GTEST_DISABLE_MSC_DEPRECATED_POP_()
// MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate // MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate
// function in order to achieve that. We use macro definition here because // function in order to achieve that. We use macro definition here because
// snprintf is a variadic function. // snprintf is a variadic function.
#if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE #if defined(_MSC_VER) && !GTEST_OS_WINDOWS_MOBILE
// MSVC 2005 and above support variadic macros. // MSVC 2005 and above support variadic macros.
#define GTEST_SNPRINTF_(buffer, size, format, ...) \ #define GTEST_SNPRINTF_(buffer, size, format, ...) \
_snprintf_s(buffer, size, size, format, __VA_ARGS__) _snprintf_s(buffer, size, size, format, __VA_ARGS__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment