From f7d58e81c35b37851733a7518c9f7260ba1b8a40 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Mon, 26 Sep 2011 17:54:02 +0000 Subject: Adds a new macro simplifying use of snprinf on MS platforms. --- src/gtest-printers.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src') diff --git a/src/gtest-printers.cc b/src/gtest-printers.cc index ed63c7b3..cfe9eed3 100644 --- a/src/gtest-printers.cc +++ b/src/gtest-printers.cc @@ -55,14 +55,6 @@ namespace { using ::std::ostream; -#if GTEST_OS_WINDOWS_MOBILE // Windows CE does not define _snprintf_s. -# define snprintf _snprintf -#elif _MSC_VER >= 1400 // VC 8.0 and later deprecate snprintf and _snprintf. -# define snprintf _snprintf_s -#elif _MSC_VER -# define snprintf _snprintf -#endif // GTEST_OS_WINDOWS_MOBILE - // Prints a segment of bytes in the given object. void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start, size_t count, ostream* os) { @@ -77,7 +69,7 @@ void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start, else *os << '-'; } - snprintf(text, sizeof(text), "%02X", obj_bytes[j]); + GTEST_SNPRINTF_(text, sizeof(text), "%02X", obj_bytes[j]); *os << text; } } -- cgit v1.2.3