summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-04-09 00:09:41 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-04-09 00:09:41 +0000
commit73a5620e851e1e1978d68f59456b85b6d81d5f33 (patch)
tree61124720302b7e95d988274f52cdf7ea6dea2fef
parent3aa2af18a9c47b16824fe0e7462c807533fcdea7 (diff)
downloadgoogletest-73a5620e851e1e1978d68f59456b85b6d81d5f33.tar.gz
Simplifies ASCII character detection in gtest-printers.h. This also makes it possible to build Google Test on MinGW.
git-svn-id: http://googletest.googlecode.com/svn/trunk@567 861a406c-534a-0410-8894-cb66d6ee9925
-rw-r--r--src/gtest-printers.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gtest-printers.cc b/src/gtest-printers.cc
index 62ea590..ed63c7b 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<char>(cur))) {
+ if (is_previous_hex && isascii(cur) && IsXDigit(static_cast<char>(cur))) {
// Previous character is of '\x..' form and this character can be
// interpreted as another hexadecimal digit in its number. Break string to
// disambiguate.