From e9adbcbb56a205dee270842f7d6221c52d508476 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Sat, 9 Apr 2011 00:09:41 +0000 Subject: [PATCH] Simplifies ASCII character detection in gtest-printers.h. This also makes it possible to build Google Test on MinGW. --- src/gtest-printers.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gtest-printers.cc b/src/gtest-printers.cc index 62ea590d..ed63c7b3 100644 --- a/src/gtest-printers.cc +++ b/src/gtest-printers.cc @@ -288,8 +288,7 @@ static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len, bool is_previous_hex = false; for (size_t index = 0; index < len; ++index) { const wchar_t cur = begin[index]; - if (is_previous_hex && 0 <= cur && cur < 128 && - IsXDigit(static_cast(cur))) { + if (is_previous_hex && isascii(cur) && IsXDigit(static_cast(cur))) { // Previous character is of '\x..' form and this character can be // interpreted as another hexadecimal digit in its number. Break string to // disambiguate.