Browse Source

use enabled macro for mapper setting

Scott Lahteine 9 years ago
parent
commit
0432613ad7
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/ultralcd.cpp

+ 4
- 4
Marlin/ultralcd.cpp View File

2469
 int lcd_strlen(const char* s) {
2469
 int lcd_strlen(const char* s) {
2470
   int i = 0, j = 0;
2470
   int i = 0, j = 0;
2471
   while (s[i]) {
2471
   while (s[i]) {
2472
-    #ifdef MAPPER_NON
2472
+    #if ENABLED(MAPPER_NON)
2473
       j++;
2473
       j++;
2474
     #else
2474
     #else
2475
-      if ((s[i] & 0xc0) != 0x80) j++;
2475
+      if ((s[i] & 0xC0u) != 0x80u) j++;
2476
     #endif
2476
     #endif
2477
     i++;
2477
     i++;
2478
   }
2478
   }
2482
 int lcd_strlen_P(const char* s) {
2482
 int lcd_strlen_P(const char* s) {
2483
   int j = 0;
2483
   int j = 0;
2484
   while (pgm_read_byte(s)) {
2484
   while (pgm_read_byte(s)) {
2485
-    #ifdef MAPPER_NON
2485
+    #if ENABLED(MAPPER_NON)
2486
       j++;
2486
       j++;
2487
     #else
2487
     #else
2488
-      if ((pgm_read_byte(s) & 0xc0) != 0x80) j++;
2488
+      if ((pgm_read_byte(s) & 0xC0u) != 0x80u) j++;
2489
     #endif
2489
     #endif
2490
     s++;
2490
     s++;
2491
   }
2491
   }

Loading…
Cancel
Save