mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
Convert some more uses of xassert(false) to BUG("...")
This commit is contained in:
parent
1ec5684438
commit
2f81a1d07c
3 changed files with 5 additions and 5 deletions
4
input.c
4
input.c
|
|
@ -325,7 +325,7 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case BIND_ACTION_COUNT:
|
case BIND_ACTION_COUNT:
|
||||||
xassert(false);
|
BUG("Invalid action type");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1150,7 +1150,7 @@ xcursor_for_csd_border(struct terminal *term, int x, int y)
|
||||||
else if (term->active_surface == TERM_SURF_BORDER_TOP) return XCURSOR_TOP_SIDE;
|
else if (term->active_surface == TERM_SURF_BORDER_TOP) return XCURSOR_TOP_SIDE;
|
||||||
else if (term->active_surface == TERM_SURF_BORDER_BOTTOM) return XCURSOR_BOTTOM_SIDE;
|
else if (term->active_surface == TERM_SURF_BORDER_BOTTOM) return XCURSOR_BOTTOM_SIDE;
|
||||||
else {
|
else {
|
||||||
xassert(false);
|
BUG("Unreachable");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
render.c
2
render.c
|
|
@ -1669,7 +1669,7 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
xassert(false);
|
BUG("unhandled surface type: %u", (unsigned)surf_idx);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
4
search.c
4
search.c
|
|
@ -785,11 +785,11 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case BIND_ACTION_SEARCH_COUNT:
|
case BIND_ACTION_SEARCH_COUNT:
|
||||||
xassert(false);
|
BUG("Invalid action type");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
xassert(false);
|
BUG("Unhandled action type");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue