Api Symbols: replace asserts with checks

merge ofw commit
This commit is contained in:
MX
2024-03-25 13:53:32 +03:00
parent 81a16e5a28
commit 585b7f963d
565 changed files with 3544 additions and 2691 deletions

View File

@@ -498,7 +498,7 @@ void text_input_timer_callback(void* context) {
true);
}
TextInput* text_input_alloc() {
TextInput* text_input_alloc(void) {
TextInput* text_input = malloc(sizeof(TextInput));
text_input->view = view_alloc();
view_set_context(text_input->view, text_input);
@@ -525,7 +525,7 @@ TextInput* text_input_alloc() {
}
void text_input_free(TextInput* text_input) {
furi_assert(text_input);
furi_check(text_input);
with_view_model(
text_input->view,
TextInputModel * model,
@@ -543,7 +543,7 @@ void text_input_free(TextInput* text_input) {
}
void text_input_reset(TextInput* text_input) {
furi_assert(text_input);
furi_check(text_input);
with_view_model(
text_input->view,
TextInputModel * model,
@@ -568,7 +568,7 @@ void text_input_reset(TextInput* text_input) {
}
View* text_input_get_view(TextInput* text_input) {
furi_assert(text_input);
furi_check(text_input);
return text_input->view;
}
@@ -579,6 +579,7 @@ void text_input_set_result_callback(
char* text_buffer,
size_t text_buffer_size,
bool clear_default_text) {
furi_check(text_input);
with_view_model(
text_input->view,
TextInputModel * model,
@@ -613,6 +614,7 @@ void text_input_set_validator(
TextInput* text_input,
TextInputValidatorCallback callback,
void* callback_context) {
furi_check(text_input);
with_view_model(
text_input->view,
TextInputModel * model,
@@ -624,6 +626,7 @@ void text_input_set_validator(
}
TextInputValidatorCallback text_input_get_validator_callback(TextInput* text_input) {
furi_check(text_input);
TextInputValidatorCallback validator_callback = NULL;
with_view_model(
text_input->view,
@@ -634,6 +637,7 @@ TextInputValidatorCallback text_input_get_validator_callback(TextInput* text_inp
}
void* text_input_get_validator_callback_context(TextInput* text_input) {
furi_check(text_input);
void* validator_callback_context = NULL;
with_view_model(
text_input->view,
@@ -644,6 +648,7 @@ void* text_input_get_validator_callback_context(TextInput* text_input) {
}
void text_input_set_header_text(TextInput* text_input, const char* text) {
furi_check(text_input);
with_view_model(
text_input->view, TextInputModel * model, { model->header = text; }, true);
}