aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/lv2plug.in/ns/ext/event/event-helpers.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-09-08 17:21:50 +0000
committerDavid Robillard <d@drobilla.net>2012-09-08 17:21:50 +0000
commit3f2868e1e5299f8f9258a9a82907b75a93a666bf (patch)
tree70d1afd1cabb7aebc5744d74b4ba624f4e0c1dba /lv2/lv2plug.in/ns/ext/event/event-helpers.h
parent386b00b4ba02b9a0b33e31848bc81eabbd44af68 (diff)
downloadlv2-3f2868e1e5299f8f9258a9a82907b75a93a666bf.tar.xz
Remove asserts from event-helper.h.
Diffstat (limited to 'lv2/lv2plug.in/ns/ext/event/event-helpers.h')
-rw-r--r--lv2/lv2plug.in/ns/ext/event/event-helpers.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lv2/lv2plug.in/ns/ext/event/event-helpers.h b/lv2/lv2plug.in/ns/ext/event/event-helpers.h
index fcd13fe..0fe2d79 100644
--- a/lv2/lv2plug.in/ns/ext/event/event-helpers.h
+++ b/lv2/lv2plug.in/ns/ext/event/event-helpers.h
@@ -22,7 +22,6 @@
#ifndef LV2_EVENT_HELPERS_H
#define LV2_EVENT_HELPERS_H
-#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -124,7 +123,9 @@ lv2_event_is_valid(LV2_Event_Iterator* iter)
static inline bool
lv2_event_increment(LV2_Event_Iterator* iter)
{
- assert(lv2_event_is_valid(iter));
+ if (!lv2_event_is_valid(iter)) {
+ return false;
+ }
LV2_Event* const ev = (LV2_Event*)(
(uint8_t*)iter->buf->data + iter->offset);
@@ -146,7 +147,9 @@ static inline LV2_Event*
lv2_event_get(LV2_Event_Iterator* iter,
uint8_t** data)
{
- assert(lv2_event_is_valid(iter));
+ if (!lv2_event_is_valid(iter)) {
+ return false;
+ }
LV2_Event* const ev = (LV2_Event*)(
(uint8_t*)iter->buf->data + iter->offset);