fix(draw_rect): delete __STDC_VERSION__ to ensure C++ compatibility (#3099)
This commit is contained in:
@@ -38,9 +38,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc)
|
||||
{
|
||||
lv_memset_00(dsc, sizeof(lv_draw_rect_dsc_t));
|
||||
dsc->bg_color = lv_color_white();
|
||||
#if __STDC_VERSION__ < 201112L
|
||||
dsc->bg_grad.stops[0].color = lv_color_white();
|
||||
#endif
|
||||
dsc->bg_grad.stops[1].color = lv_color_black();
|
||||
dsc->bg_grad.stops[1].frac = 0xFF;
|
||||
dsc->bg_grad.stops_count = 2;
|
||||
|
||||
@@ -35,14 +35,8 @@ typedef struct {
|
||||
|
||||
/*Background*/
|
||||
lv_opa_t bg_opa;
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
union {
|
||||
#endif
|
||||
lv_color_t bg_color; /**< First element of a gradient is a color, so it maps well here*/
|
||||
lv_grad_dsc_t bg_grad;
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
};
|
||||
#endif
|
||||
lv_color_t bg_color; /**< First element of a gradient is a color, so it maps well here*/
|
||||
lv_grad_dsc_t bg_grad;
|
||||
|
||||
/*Background img*/
|
||||
const void * bg_img_src;
|
||||
|
||||
Reference in New Issue
Block a user