Browse Source

🩹 Followup for lchar_t

Scott Lahteine 1 year 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,7 +99,7 @@ static inline bool utf8_is_start_byte_of_char(const uint8_t b) {
99 99
 
100 100
 /* This function gets the character at the pstart position, interpreting UTF8 multibyte sequences
101 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 103
   uint32_t val = 0;
104 104
   const uint8_t *p = pstart;
105 105
 
@@ -158,7 +158,7 @@ const uint8_t* get_utf8_value_cb(const uint8_t *pstart, read_byte_cb_t cb_read_b
158 158
   else
159 159
     for (; 0xFC < (0xFE & valcur); ) { p++; valcur = cb_read_byte(p); }
160 160
 
161
-  if (pval) *pval = val;
161
+  pval = val;
162 162
 
163 163
   return p;
164 164
 }

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

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

Loading…
Cancel
Save