Reduce type warnings

This commit is contained in:
Scott Lahteine 2019-07-05 16:29:14 -05:00
parent 750a16ad38
commit 67e0238c89

View file

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