Skip to content

Commit

Permalink
removed redundant comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
mgieseki committed Jul 23, 2024
1 parent 3e9d16f commit f5941ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Unicode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ uint32_t Unicode::utf8ToCodepoint (const string &utf8) {
auto len = utf8.length();
if (len > 0) {
unsigned char c0 = utf8[0];
if (c0 >= 0 && c0 <= 127)
if (c0 <= 127)
return c0;
if (len > 1) {
unsigned char c1 = utf8[1];
Expand Down

0 comments on commit f5941ea

Please sign in to comment.