mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 04:41:26 +04:00
Api Symbols: replace asserts with checks (#3507)
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
@@ -300,12 +300,12 @@ static bool button_menu_view_input_callback(InputEvent* event, void* context) {
|
||||
}
|
||||
|
||||
View* button_menu_get_view(ButtonMenu* button_menu) {
|
||||
furi_assert(button_menu);
|
||||
furi_check(button_menu);
|
||||
return button_menu->view;
|
||||
}
|
||||
|
||||
void button_menu_reset(ButtonMenu* button_menu) {
|
||||
furi_assert(button_menu);
|
||||
furi_check(button_menu);
|
||||
|
||||
with_view_model(
|
||||
button_menu->view,
|
||||
@@ -319,7 +319,7 @@ void button_menu_reset(ButtonMenu* button_menu) {
|
||||
}
|
||||
|
||||
void button_menu_set_header(ButtonMenu* button_menu, const char* header) {
|
||||
furi_assert(button_menu);
|
||||
furi_check(button_menu);
|
||||
|
||||
with_view_model(
|
||||
button_menu->view, ButtonMenuModel * model, { model->header = header; }, true);
|
||||
@@ -333,8 +333,8 @@ ButtonMenuItem* button_menu_add_item(
|
||||
ButtonMenuItemType type,
|
||||
void* callback_context) {
|
||||
ButtonMenuItem* item = NULL;
|
||||
furi_assert(label);
|
||||
furi_assert(button_menu);
|
||||
furi_check(label);
|
||||
furi_check(button_menu);
|
||||
|
||||
with_view_model(
|
||||
button_menu->view,
|
||||
@@ -376,7 +376,7 @@ ButtonMenu* button_menu_alloc(void) {
|
||||
}
|
||||
|
||||
void button_menu_free(ButtonMenu* button_menu) {
|
||||
furi_assert(button_menu);
|
||||
furi_check(button_menu);
|
||||
|
||||
with_view_model(
|
||||
button_menu->view,
|
||||
@@ -388,7 +388,7 @@ void button_menu_free(ButtonMenu* button_menu) {
|
||||
}
|
||||
|
||||
void button_menu_set_selected_item(ButtonMenu* button_menu, uint32_t index) {
|
||||
furi_assert(button_menu);
|
||||
furi_check(button_menu);
|
||||
|
||||
with_view_model(
|
||||
button_menu->view,
|
||||
|
||||
Reference in New Issue
Block a user