diff options
Diffstat (limited to 'absl/strings/ascii.cc')
-rw-r--r-- | absl/strings/ascii.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/absl/strings/ascii.cc b/absl/strings/ascii.cc index 868df2d1..93bb03e9 100644 --- a/absl/strings/ascii.cc +++ b/absl/strings/ascii.cc @@ -157,13 +157,13 @@ ABSL_DLL const char kToUpper[256] = { void AsciiStrToLower(std::string* s) { for (auto& ch : *s) { - ch = absl::ascii_tolower(static_cast<unsigned char>(ch)); + ch = absl::ascii_tolower(ch); } } void AsciiStrToUpper(std::string* s) { for (auto& ch : *s) { - ch = absl::ascii_toupper(static_cast<unsigned char>(ch)); + ch = absl::ascii_toupper(ch); } } @@ -183,17 +183,17 @@ void RemoveExtraAsciiWhitespace(std::string* str) { for (; input_it < input_end; ++input_it) { if (is_ws) { // Consecutive whitespace? Keep only the last. - is_ws = absl::ascii_isspace(static_cast<unsigned char>(*input_it)); + is_ws = absl::ascii_isspace(*input_it); if (is_ws) --output_it; } else { - is_ws = absl::ascii_isspace(static_cast<unsigned char>(*input_it)); + is_ws = absl::ascii_isspace(*input_it); } *output_it = *input_it; ++output_it; } - str->erase(static_cast<size_t>(output_it - &(*str)[0])); + str->erase(output_it - &(*str)[0]); } ABSL_NAMESPACE_END |