Skip to content

Commit

Permalink
Remove redundant lowercase check.
Browse files Browse the repository at this point in the history
Change-Id: I332ba23b4f9d4f65de0d27dd4ce906363d01049b
Reviewed-on: https://code-review.googlesource.com/12431
Reviewed-by: Paul Wankadia <junyer@google.com>
  • Loading branch information
junyer committed Apr 24, 2017
1 parent ade2c95 commit 1bcbb5f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions re2/tostring.cc
Original file line number Diff line number Diff line change
@@ -131,8 +131,7 @@ static void AppendLiteral(string *t, Rune r, bool foldcase) {
t->append(1, '\\');
t->append(1, static_cast<char>(r));
} else if (foldcase && 'a' <= r && r <= 'z') {
if ('a' <= r && r <= 'z')
r += 'A' - 'a';
r -= 'a' - 'A';
t->append(1, '[');
t->append(1, static_cast<char>(r));
t->append(1, static_cast<char>(r) + 'a' - 'A');

0 comments on commit 1bcbb5f

Please sign in to comment.