diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-04-09 00:09:41 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2011-04-09 00:09:41 +0000 |
commit | e9adbcbb56a205dee270842f7d6221c52d508476 (patch) | |
tree | 61124720302b7e95d988274f52cdf7ea6dea2fef /src | |
parent | 6323646e196fc0c9a7ef5c67143acf2180ec906f (diff) | |
download | googletest-e9adbcbb56a205dee270842f7d6221c52d508476.tar.gz googletest-e9adbcbb56a205dee270842f7d6221c52d508476.tar.bz2 googletest-e9adbcbb56a205dee270842f7d6221c52d508476.zip |
Simplifies ASCII character detection in gtest-printers.h. This also makes it possible to build Google Test on MinGW.
Diffstat (limited to 'src')
-rw-r--r-- | src/gtest-printers.cc | 3 |
1 files changed, 1 insertions, 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<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. |