mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 12:38:35 -07:00
Api Symbols: replace asserts with checks
merge ofw commit
This commit is contained in:
@@ -22,7 +22,7 @@ void dolphin_deed(DolphinDeed deed) {
|
||||
}
|
||||
|
||||
DolphinStats dolphin_stats(Dolphin* dolphin) {
|
||||
furi_assert(dolphin);
|
||||
furi_check(dolphin);
|
||||
|
||||
DolphinStats stats;
|
||||
DolphinEvent event;
|
||||
@@ -36,7 +36,7 @@ DolphinStats dolphin_stats(Dolphin* dolphin) {
|
||||
}
|
||||
|
||||
void dolphin_flush(Dolphin* dolphin) {
|
||||
furi_assert(dolphin);
|
||||
furi_check(dolphin);
|
||||
|
||||
DolphinEvent event;
|
||||
event.type = DolphinEventTypeFlush;
|
||||
@@ -73,7 +73,7 @@ void dolphin_clear_limits_timer_callback(void* context) {
|
||||
dolphin_event_send_async(dolphin, &event);
|
||||
}
|
||||
|
||||
Dolphin* dolphin_alloc() {
|
||||
Dolphin* dolphin_alloc(void) {
|
||||
Dolphin* dolphin = malloc(sizeof(Dolphin));
|
||||
|
||||
dolphin->state = dolphin_state_alloc();
|
||||
@@ -119,6 +119,7 @@ void dolphin_event_release(Dolphin* dolphin, DolphinEvent* event) {
|
||||
}
|
||||
|
||||
FuriPubSub* dolphin_get_pubsub(Dolphin* dolphin) {
|
||||
furi_check(dolphin);
|
||||
return dolphin->pubsub;
|
||||
}
|
||||
|
||||
@@ -201,6 +202,8 @@ int32_t dolphin_srv(void* p) {
|
||||
}
|
||||
|
||||
void dolphin_upgrade_level(Dolphin* dolphin) {
|
||||
furi_check(dolphin);
|
||||
|
||||
dolphin_state_increase_level(dolphin->state);
|
||||
dolphin_flush(dolphin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user