From 1b519cd1044112e928a17ed020e7b165232ab74a Mon Sep 17 00:00:00 2001 From: canardos Date: Tue, 19 Feb 2019 15:06:23 +0800 Subject: [PATCH] Add const qualifier to lv_btnm_set_map / static functions --- lv_objx/lv_btnm.c | 10 +++++----- lv_objx/lv_btnm.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index fb6712998..c1f8cfcc3 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -35,8 +35,8 @@ static bool button_is_inactive(lv_btn_ctrl_t ctrl_bits); const char * cut_ctrl_byte(const char * btn_str); static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static uint16_t get_button_text(lv_obj_t * btnm, uint16_t btn_id); -static void parse_control_bytes(lv_obj_t * btnm, const char ** map); -static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map); +static void parse_control_bytes(const lv_obj_t * btnm, const char ** map); +static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map); static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); static bool maps_are_identical(const char ** map1, const char ** map2); @@ -153,7 +153,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) * Example (practically use octal numbers): "\224abc": "abc" text * with 4 width and no long press. */ -void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) +void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) { if(map == NULL) return; @@ -874,7 +874,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) * @param btnm pointer to button matrix object * @param map_p pointer to a string array */ -static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map) +static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map) { /*Count the buttons in the map*/ uint16_t btn_cnt = 0; @@ -911,7 +911,7 @@ static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map) * @param btnm pointer to button matrix object * @param map_p pointer to a string array */ -static void parse_control_bytes(lv_obj_t * btnm, const char ** map) +static void parse_control_bytes(const lv_obj_t * btnm, const char ** map) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index a60c31720..8da2a8006 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -114,7 +114,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); * - bit 2..0: button relative width * Example (practically use octal numbers): "\224abc": "abc" text with 4 width and no long press */ -void lv_btnm_set_map(lv_obj_t * btnm, const char ** map); +void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); /** * Set the button control map (hidden, disabled etc.) for a button matrix. The