diff options
author | David Robillard <d@drobilla.net> | 2018-09-23 13:42:29 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-23 13:42:29 +0200 |
commit | cdf5e54b396d6a4fbe9abb14fd31a050719f66ba (patch) | |
tree | bfc90f80878e46e3ce56e63d89916c266c59759a | |
parent | 973b8fbca869e062f39caac140b39406ad9896c5 (diff) | |
download | lv2-cdf5e54b396d6a4fbe9abb14fd31a050719f66ba.tar.xz |
Remove redundant casts
-rw-r--r-- | lv2/event/event-helpers.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lv2/event/event-helpers.h b/lv2/event/event-helpers.h index 6eab3b6..31323f5 100644 --- a/lv2/event/event-helpers.h +++ b/lv2/event/event-helpers.h @@ -127,8 +127,7 @@ lv2_event_increment(LV2_Event_Iterator* iter) return false; } - LV2_Event* const ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); + LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset); iter->offset += lv2_event_pad_size( (uint16_t)((uint16_t)sizeof(LV2_Event) + ev->size)); @@ -152,8 +151,7 @@ lv2_event_get(LV2_Event_Iterator* iter, return NULL; } - LV2_Event* const ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); + LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset); if (data) *data = (uint8_t*)ev + sizeof(LV2_Event); @@ -181,8 +179,7 @@ lv2_event_write(LV2_Event_Iterator* iter, if (iter->buf->capacity - iter->buf->size < sizeof(LV2_Event) + size) return false; - LV2_Event* const ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); + LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset); ev->frames = frames; ev->subframes = subframes; @@ -213,8 +210,7 @@ lv2_event_reserve(LV2_Event_Iterator* iter, if (iter->buf->capacity - iter->buf->size < total_size) return NULL; - LV2_Event* const ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); + LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset); ev->frames = frames; ev->subframes = subframes; @@ -244,8 +240,7 @@ lv2_event_write_event(LV2_Event_Iterator* iter, if (iter->buf->capacity - iter->buf->size < total_size) return false; - LV2_Event* const write_ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); + LV2_Event* const write_ev = (LV2_Event*)(iter->buf->data + iter->offset); *write_ev = *ev; memcpy((uint8_t*)write_ev + sizeof(LV2_Event), data, ev->size); |