From 1e89cd804c9fb8d00e898c86580f55e075e54d18 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 22 Jun 2010 21:28:05 +0000 Subject: Avoid tolower, it's slow and unnecessary. llvm-svn: 106580 --- lldb/source/Utility/StringExtractor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/source/Utility/StringExtractor.cpp') diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp index d2f69f95b7c..86cd623f55c 100644 --- a/lldb/source/Utility/StringExtractor.cpp +++ b/lldb/source/Utility/StringExtractor.cpp @@ -17,18 +17,20 @@ static inline int xdigit_to_sint (char ch) { - ch = tolower(ch); if (ch >= 'a' && ch <= 'f') return 10 + ch - 'a'; + if (ch >= 'A' && ch <= 'F') + return 10 + ch - 'A'; return ch - '0'; } static inline unsigned int xdigit_to_uint (uint8_t ch) { - ch = tolower(ch); if (ch >= 'a' && ch <= 'f') return 10u + ch - 'a'; + if (ch >= 'A' && ch <= 'F') + return 10u + ch - 'A'; return ch - '0'; } -- cgit v1.2.3