remove check that isn't needed

David Rebbe 2024-12-04 12:36:04 -05:00
parent b88f8dbb05
commit 6a17e98488
1 changed files with 0 additions and 4 deletions

View File

@ -424,10 +424,6 @@ ICSNEO_API icsneo_error_t icsneo_get_events(icsneo_event_t** events, uint32_t* e
// Get the mininum number of events
auto min_size = std::minmax(static_cast<uint32_t>(global_events.size()), *events_count).first;
*events_count = min_size;
// GetEvents uses 0 as unlimited, where the API can't allocate anything.
if (min_size == 0) {
return icsneo_error_success;
}
// Copy the events into the global event container
for (uint32_t i = 0; i < min_size; i++) {
auto e = icsneo_event_t {