Browse Source

General cleanup to utf_mapper.h

Scott Lahteine 7 years ago
parent
commit
49599caade
1 changed files with 12 additions and 12 deletions
  1. 12
    12
      Marlin/utf_mapper.h

+ 12
- 12
Marlin/utf_mapper.h View File

@@ -150,8 +150,8 @@
150 150
     static uint8_t utf_hi_char; // UTF-8 high part
151 151
     static bool seen_c2 = false;
152 152
     uint8_t d = c;
153
-    if ( d >= 0x80u ) { // UTF-8 handling
154
-      if ( (d >= 0xC0u) && (!seen_c2) ) {
153
+    if (d >= 0x80u) { // UTF-8 handling
154
+      if (d >= 0xC0u && !seen_c2) {
155 155
         utf_hi_char = d - 0xC2u;
156 156
         seen_c2 = true;
157 157
         return 0;
@@ -185,10 +185,10 @@
185 185
                 seen_c4 = false,
186 186
                 seen_c5 = false;
187 187
     uint8_t d = c;
188
-    if ( d >= 0x80u ) { // UTF-8 handling
189
-           if ( d == 0xC4u ) {seen_c4 = true; return 0;}
190
-      else if ( d == 0xC5u ) {seen_c5 = true; return 0;}
191
-      else if ( (d >= 0xC0u) && (!seen_c2) ) {
188
+    if (d >= 0x80u) { // UTF-8 handling
189
+           if (d == 0xC4u) { seen_c4 = true; return 0; }
190
+      else if (d == 0xC5u) { seen_c5 = true; return 0; }
191
+      else if (d >= 0xC0u && !seen_c2) {
192 192
         utf_hi_char = d - 0xC2u;
193 193
         seen_c2 = true;
194 194
         return 0;
@@ -236,8 +236,8 @@
236 236
     static uint8_t utf_hi_char; // UTF-8 high part
237 237
     static bool seen_ce = false;
238 238
     uint8_t d = c;
239
-    if ( d >= 0x80 ) { // UTF-8 handling
240
-      if ( (d >= 0xC0) && (!seen_ce) ) {
239
+    if (d >= 0x80) { // UTF-8 handling
240
+      if (d >= 0xC0 && !seen_ce) {
241 241
         utf_hi_char = d - 0xCE;
242 242
         seen_ce = true;
243 243
         return 0;
@@ -424,10 +424,10 @@
424 424
                 seen_c4 = false,
425 425
                 seen_c5 = false;
426 426
     uint8_t d = c;
427
-    if ( d >= 0x80u ) { // UTF-8 handling
428
-           if ( d == 0xC4u ) {seen_c4 = true; return 0;}
429
-      else if ( d == 0xC5u ) {seen_c5 = true; return 0;}
430
-      else if ( d == 0xC3u ) {seen_c3 = true; return 0;}
427
+    if (d >= 0x80u) { // UTF-8 handling
428
+           if (d == 0xC4u) { seen_c4 = true; return 0; }
429
+      else if (d == 0xC5u) { seen_c5 = true; return 0; }
430
+      else if (d == 0xC3u) { seen_c3 = true; return 0; }
431 431
       else if (seen_c4) {
432 432
         switch(d) {
433 433
           case 0x84u ... 0x87u: d -= 4; break;  //Ą - ć

Loading…
Cancel
Save