chore: remove not needed "expression ? true : false" (#4485)

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu
2023-08-26 04:58:21 +08:00
committed by GitHub
parent 7899f77ee9
commit b6c5ab3954
28 changed files with 62 additions and 63 deletions

View File

@@ -5,8 +5,8 @@ static void event_cb(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
uint32_t id = lv_btnmatrix_get_selected_btn(obj);
bool prev = id == 0 ? true : false;
bool next = id == 6 ? true : false;
bool prev = id == 0;
bool next = id == 6;
if(prev || next) {
/*Find the checked button*/
uint32_t i;