format code

This commit is contained in:
xianjimli 2020-02-17 16:40:41 +08:00
parent a3358f0e57
commit 99ec96af7f
4 changed files with 6 additions and 9 deletions

View File

@ -81,14 +81,14 @@ idle_info_t* idle_info_cast(idle_info_t* idle) {
}
bool_t idle_info_is_available(idle_info_t* idle, uint32_t dispatch_id) {
return idle != NULL && !(idle->busy) && idle->dispatch_id != dispatch_id;
return idle != NULL && !(idle->busy) && idle->dispatch_id != dispatch_id;
}
ret_t idle_info_on_idle(idle_info_t* idle, uint32_t dispatch_id) {
ret_t ret = RET_OK;
return_value_if_fail(idle != NULL && idle->on_idle != NULL, RET_BAD_PARAMS);
if(idle->busy) {
if (idle->busy) {
return RET_BUSY;
}
@ -99,4 +99,3 @@ ret_t idle_info_on_idle(idle_info_t* idle, uint32_t dispatch_id) {
return ret;
}

View File

@ -96,7 +96,6 @@ struct _idle_info_t {
*/
idle_info_t* idle_info_cast(idle_info_t* idle);
/*internal use*/
int idle_info_compare(const void* a, const void* b);
idle_info_t* idle_info_init_dummy(idle_info_t* idle, uint32_t id);

View File

@ -89,7 +89,7 @@ ret_t timer_info_on_timer(timer_info_t* timer, uint64_t now) {
ret_t ret = RET_OK;
return_value_if_fail(timer != NULL && timer->on_timer != NULL, RET_BAD_PARAMS);
if(timer->busy) {
if (timer->busy) {
return RET_BUSY;
}
@ -104,4 +104,3 @@ ret_t timer_info_on_timer(timer_info_t* timer, uint64_t now) {
bool_t timer_info_is_available(timer_info_t* timer, uint64_t now) {
return timer != NULL && !(timer->busy) && timer->now != now;
}

View File

@ -32,19 +32,19 @@ static ret_t clip_view_on_paint_children(widget_t* widget, canvas_t* c) {
return_value_if_fail(clip_view != NULL, RET_BAD_PARAMS);
canvas_get_clip_rect(c, &r_save);
if(vg != NULL) {
if (vg != NULL) {
r_vg_save = rect_init(vg->clip_rect.x, vg->clip_rect.y, vg->clip_rect.w, vg->clip_rect.h);
}
r = rect_init(c->ox, c->oy, widget->w, widget->h);
r = rect_intersect(&r, &r_save);
canvas_set_clip_rect(c, &r);
if(vg != NULL) {
if (vg != NULL) {
vgcanvas_clip_rect(vg, r.x, r.y, r.w, r.h);
}
widget_on_paint_children_default(widget, c);
if(vg != NULL) {
if (vg != NULL) {
vgcanvas_clip_rect(vg, r_vg_save.x, r_vg_save.y, r_vg_save.w, r_vg_save.h);
}
canvas_set_clip_rect(c, &r_save);