mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
Update lv_list.c
change the code style
This commit is contained in:
parent
6ecd3f1f8a
commit
46b4186216
@ -240,8 +240,7 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index)
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
lv_obj_t * e = lv_list_get_next_btn(list, NULL);
|
lv_obj_t * e = lv_list_get_next_btn(list, NULL);
|
||||||
while(e != NULL) {
|
while(e != NULL) {
|
||||||
if(count == index)
|
if(count == index) {
|
||||||
{
|
|
||||||
lv_obj_del(e);
|
lv_obj_del(e);
|
||||||
ext->size --;
|
ext->size --;
|
||||||
return true;
|
return true;
|
||||||
@ -479,8 +478,7 @@ int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn)
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
lv_obj_t * e = lv_list_get_next_btn(list, NULL);
|
lv_obj_t * e = lv_list_get_next_btn(list, NULL);
|
||||||
while(e != NULL) {
|
while(e != NULL) {
|
||||||
if(e == btn)
|
if(e == btn) {
|
||||||
{
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
index ++;
|
index ++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user