浏览代码

🩹 Followup for lchar_t

Scott Lahteine 2 年前
父节点
当前提交
2b6ce3006e
共有 2 个文件被更改,包括 4 次插入2 次删除
  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 查看文件

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 查看文件

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
 

正在加载...
取消
保存