mirror of
https://github.com/lvgl/lvgl.git
synced 2024-12-04 15:14:03 +08:00
fix(style):add const qualifier for lv_style_get_prop() (#2933)
This commit is contained in:
parent
5bb3686ea8
commit
0831b6ba76
@ -208,7 +208,7 @@ void lv_style_set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_
|
||||
style->has_group |= 1 << group;
|
||||
}
|
||||
|
||||
lv_res_t lv_style_get_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value)
|
||||
lv_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value)
|
||||
{
|
||||
return lv_style_get_prop_inlined(style, prop, value);
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ void lv_style_set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_
|
||||
* LV_RES_OK: the property was fond, and `value` is set accordingly
|
||||
* @note For performance reasons there are no sanity check on `style`
|
||||
*/
|
||||
lv_res_t lv_style_get_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value);
|
||||
lv_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value);
|
||||
|
||||
|
||||
/**
|
||||
@ -352,7 +352,8 @@ lv_res_t lv_style_get_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
* @note For performance reasons there are no sanity check on `style`
|
||||
* @note This function is the same as ::lv_style_get_prop but inlined. Use it only on performance critical places
|
||||
*/
|
||||
static inline lv_res_t lv_style_get_prop_inlined(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value)
|
||||
static inline lv_res_t lv_style_get_prop_inlined(const lv_style_t * style, lv_style_prop_t prop,
|
||||
lv_style_value_t * value)
|
||||
{
|
||||
if(style->is_const) {
|
||||
const lv_style_const_prop_t * const_prop;
|
||||
|
Loading…
Reference in New Issue
Block a user