mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 01:18:35 -07:00
Api Symbols: replace asserts with checks
merge ofw commit
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const SubGhzProtocol* subghz_protocol_registry_get_by_name(
|
||||
const SubGhzProtocolRegistry* protocol_registry,
|
||||
const char* name) {
|
||||
furi_assert(protocol_registry);
|
||||
furi_check(protocol_registry);
|
||||
|
||||
for(size_t i = 0; i < subghz_protocol_registry_count(protocol_registry); i++) {
|
||||
if(strcmp(name, protocol_registry->items[i]->name) == 0) {
|
||||
@@ -16,7 +16,7 @@ const SubGhzProtocol* subghz_protocol_registry_get_by_name(
|
||||
const SubGhzProtocol* subghz_protocol_registry_get_by_index(
|
||||
const SubGhzProtocolRegistry* protocol_registry,
|
||||
size_t index) {
|
||||
furi_assert(protocol_registry);
|
||||
furi_check(protocol_registry);
|
||||
if(index < subghz_protocol_registry_count(protocol_registry)) {
|
||||
return protocol_registry->items[index];
|
||||
} else {
|
||||
@@ -25,6 +25,6 @@ const SubGhzProtocol* subghz_protocol_registry_get_by_index(
|
||||
}
|
||||
|
||||
size_t subghz_protocol_registry_count(const SubGhzProtocolRegistry* protocol_registry) {
|
||||
furi_assert(protocol_registry);
|
||||
furi_check(protocol_registry);
|
||||
return protocol_registry->size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user