Browse Source

🩹 Followup for lchar_t

Scott Lahteine 3 years ago
parent
commit
2b6ce3006e
2 changed files with 4 additions and 2 deletions
  1. 2
    2
      Marlin/src/lcd/fontutils.cpp
  2. 2
    0
      Marlin/src/lcd/tft/tft_string.h

+ 2
- 2
Marlin/src/lcd/fontutils.cpp View File

99
 
99
 
100
 /* This function gets the character at the pstart position, interpreting UTF8 multibyte sequences
100
 /* This function gets the character at the pstart position, interpreting UTF8 multibyte sequences
101
    and returns the pointer to the next character */
101
    and returns the pointer to the next character */
102
-const uint8_t* get_utf8_value_cb(const uint8_t *pstart, read_byte_cb_t cb_read_byte, lchar_t *pval) {
102
+const uint8_t* get_utf8_value_cb(const uint8_t *pstart, read_byte_cb_t cb_read_byte, lchar_t &pval) {
103
   uint32_t val = 0;
103
   uint32_t val = 0;
104
   const uint8_t *p = pstart;
104
   const uint8_t *p = pstart;
105
 
105
 
158
   else
158
   else
159
     for (; 0xFC < (0xFE & valcur); ) { p++; valcur = cb_read_byte(p); }
159
     for (; 0xFC < (0xFE & valcur); ) { p++; valcur = cb_read_byte(p); }
160
 
160
 
161
-  if (pval) *pval = val;
161
+  pval = val;
162
 
162
 
163
   return p;
163
   return p;
164
 }
164
 }

+ 2
- 0
Marlin/src/lcd/tft/tft_string.h View File

25
 
25
 
26
 #include <stdint.h>
26
 #include <stdint.h>
27
 
27
 
28
+#include "../fontutils.h"
29
+
28
 extern const uint8_t ISO10646_1_5x7[];
30
 extern const uint8_t ISO10646_1_5x7[];
29
 extern const uint8_t font10x20[];
31
 extern const uint8_t font10x20[];
30
 
32
 

Loading…
Cancel
Save