diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-09-26 17:54:02 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-09-26 17:54:02 +0000 |
commit | cdfd81f8a41c4604c5dbb26ee7f3cc1b3184afe5 (patch) | |
tree | a82abdf4234927dfc5c2e2302a60511a0483d35c /src | |
parent | 524cc4e19491029979f7b18b9451b2a6105131ed (diff) | |
download | gtest-cdfd81f8a41c4604c5dbb26ee7f3cc1b3184afe5.tar.gz gtest-cdfd81f8a41c4604c5dbb26ee7f3cc1b3184afe5.tar.bz2 gtest-cdfd81f8a41c4604c5dbb26ee7f3cc1b3184afe5.tar.xz |
Adds a new macro simplifying use of snprinf on MS platforms.
git-svn-id: http://googletest.googlecode.com/svn/trunk@597 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src')
-rw-r--r-- | src/gtest-printers.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/gtest-printers.cc b/src/gtest-printers.cc index ed63c7b..cfe9eed 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; } } |