Fixes all functions reported in #513 and add a missing semicolon in #531

This commit is contained in:
Carlos
2018-11-05 22:21:20 -06:00
parent a81b735016
commit fbf44f1991
21 changed files with 292 additions and 169 deletions

View File

@@ -1137,13 +1137,15 @@ lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj)
*/
lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, const lv_obj_t * child)
{
lv_obj_t * result = NULL;
if(child == NULL) {
return lv_ll_get_head(&obj->child_ll);
result = lv_ll_get_head(&obj->child_ll);
} else {
return lv_ll_get_next(&obj->child_ll, child);
result = lv_ll_get_next(&obj->child_ll, child);
}
return NULL;
return result;
}
/**
@@ -1155,13 +1157,15 @@ lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, const lv_obj_t * child)
*/
lv_obj_t * lv_obj_get_child_back(const lv_obj_t * obj, const lv_obj_t * child)
{
lv_obj_t * result = NULL;
if(child == NULL) {
return lv_ll_get_tail(&obj->child_ll);
result = lv_ll_get_tail(&obj->child_ll);
} else {
return lv_ll_get_prev(&obj->child_ll, child);
result = lv_ll_get_prev(&obj->child_ll, child);
}
return NULL;
return result;
}
/**