General cleanup to utf_mapper.h

This commit is contained in:
Scott Lahteine 2017-05-21 05:58:03 -05:00
parent 02f15f6775
commit 49599caade

View File

@ -151,7 +151,7 @@
static bool seen_c2 = false;
uint8_t d = c;
if (d >= 0x80u) { // UTF-8 handling
if ( (d >= 0xC0u) && (!seen_c2) ) {
if (d >= 0xC0u && !seen_c2) {
utf_hi_char = d - 0xC2u;
seen_c2 = true;
return 0;
@ -188,7 +188,7 @@
if (d >= 0x80u) { // UTF-8 handling
if (d == 0xC4u) { seen_c4 = true; return 0; }
else if (d == 0xC5u) { seen_c5 = true; return 0; }
else if ( (d >= 0xC0u) && (!seen_c2) ) {
else if (d >= 0xC0u && !seen_c2) {
utf_hi_char = d - 0xC2u;
seen_c2 = true;
return 0;
@ -237,7 +237,7 @@
static bool seen_ce = false;
uint8_t d = c;
if (d >= 0x80) { // UTF-8 handling
if ( (d >= 0xC0) && (!seen_ce) ) {
if (d >= 0xC0 && !seen_ce) {
utf_hi_char = d - 0xCE;
seen_ce = true;
return 0;