Browse Source

Reduce type warnings

Scott Lahteine 6 years ago
parent
commit
67e0238c89
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp

+ 4
- 4
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp View File

@@ -162,12 +162,12 @@ void MarlinUI::set_font(const MarlinFont font_nr) {
162 162
     // Determine text space needed
163 163
     #ifndef STRING_SPLASH_LINE2
164 164
       constexpr uint8_t text_total_height = MENU_FONT_HEIGHT,
165
-                        text_width_1 = (sizeof(STRING_SPLASH_LINE1) - 1) * (MENU_FONT_WIDTH),
165
+                        text_width_1 = uint8_t(sizeof(STRING_SPLASH_LINE1) - 1) * uint8_t(MENU_FONT_WIDTH),
166 166
                         text_width_2 = 0;
167 167
     #else
168
-      constexpr uint8_t text_total_height = (MENU_FONT_HEIGHT) * 2,
169
-                        text_width_1 = (sizeof(STRING_SPLASH_LINE1) - 1) * (MENU_FONT_WIDTH),
170
-                        text_width_2 = (sizeof(STRING_SPLASH_LINE2) - 1) * (MENU_FONT_WIDTH);
168
+      constexpr uint8_t text_total_height = uint8_t(MENU_FONT_HEIGHT) * 2,
169
+                        text_width_1 = uint8_t(sizeof(STRING_SPLASH_LINE1) - 1) * uint8_t(MENU_FONT_WIDTH),
170
+                        text_width_2 = uint8_t(sizeof(STRING_SPLASH_LINE2) - 1) * uint8_t(MENU_FONT_WIDTH);
171 171
     #endif
172 172
     constexpr uint8_t text_max_width = _MAX(text_width_1, text_width_2),
173 173
                       rspace = width - (START_BMPWIDTH);

Loading…
Cancel
Save