diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/lv2/atom/atom.h | 4 | ||||
-rw-r--r-- | include/lv2/atom/util.h | 2 | ||||
-rw-r--r-- | include/lv2/core/lv2.h | 1 | ||||
-rw-r--r-- | include/lv2/event/event-helpers.h | 3 | ||||
-rw-r--r-- | include/lv2/ui/ui.h | 2 |
5 files changed, 7 insertions, 5 deletions
diff --git a/include/lv2/atom/atom.h b/include/lv2/atom/atom.h index ca607d3..41af21a 100644 --- a/include/lv2/atom/atom.h +++ b/include/lv2/atom/atom.h @@ -68,13 +68,13 @@ extern "C" { @param type The type of the atom, for example LV2_Atom_String. @param atom A variable-sized atom. */ -#define LV2_ATOM_CONTENTS(type, atom) ((void*)((uint8_t*)(atom) + sizeof(type))) +#define LV2_ATOM_CONTENTS(type, atom) ((void*)((type*)(atom) + 1U)) /** Const version of LV2_ATOM_CONTENTS. */ #define LV2_ATOM_CONTENTS_CONST(type, atom) \ - ((const void*)((const uint8_t*)(atom) + sizeof(type))) + ((const void*)((const type*)(atom) + 1U)) /** Return a pointer to the body of an Atom. The "body" of an atom is the diff --git a/include/lv2/atom/util.h b/include/lv2/atom/util.h index a2369da..b8bb295 100644 --- a/include/lv2/atom/util.h +++ b/include/lv2/atom/util.h @@ -182,7 +182,7 @@ lv2_atom_sequence_append_event(LV2_Atom_Sequence* seq, static inline LV2_Atom* lv2_atom_tuple_begin(const LV2_Atom_Tuple* tup) { - return (LV2_Atom*)(LV2_ATOM_BODY(tup)); + return (LV2_Atom*)tup + 1U; } /** Return true iff `i` has reached the end of `body`. */ diff --git a/include/lv2/core/lv2.h b/include/lv2/core/lv2.h index b085ac5..c70a4c2 100644 --- a/include/lv2/core/lv2.h +++ b/include/lv2/core/lv2.h @@ -36,6 +36,7 @@ #define LV2_CORE__AnalyserPlugin LV2_CORE_PREFIX "AnalyserPlugin" ///< http://lv2plug.in/ns/lv2core#AnalyserPlugin #define LV2_CORE__AudioPort LV2_CORE_PREFIX "AudioPort" ///< http://lv2plug.in/ns/lv2core#AudioPort #define LV2_CORE__BandpassPlugin LV2_CORE_PREFIX "BandpassPlugin" ///< http://lv2plug.in/ns/lv2core#BandpassPlugin +#define LV2_CORE__BandstopPlugin LV2_CORE_PREFIX "BandstopPlugin" ///< http://lv2plug.in/ns/lv2core#BandstopPlugin #define LV2_CORE__CVPort LV2_CORE_PREFIX "CVPort" ///< http://lv2plug.in/ns/lv2core#CVPort #define LV2_CORE__ChorusPlugin LV2_CORE_PREFIX "ChorusPlugin" ///< http://lv2plug.in/ns/lv2core#ChorusPlugin #define LV2_CORE__CombPlugin LV2_CORE_PREFIX "CombPlugin" ///< http://lv2plug.in/ns/lv2core#CombPlugin diff --git a/include/lv2/event/event-helpers.h b/include/lv2/event/event-helpers.h index a9eb423..5ec9a84 100644 --- a/include/lv2/event/event-helpers.h +++ b/include/lv2/event/event-helpers.h @@ -107,7 +107,8 @@ lv2_event_increment(LV2_Event_Iterator* iter) return false; } - LV2_Event* const ev = (LV2_Event*)(iter->buf->data + iter->offset); + const LV2_Event* const ev = + (const LV2_Event*)(iter->buf->data + iter->offset); iter->offset += lv2_event_pad_size((uint16_t)((uint16_t)sizeof(LV2_Event) + ev->size)); diff --git a/include/lv2/ui/ui.h b/include/lv2/ui/ui.h index d825d76..d17edcb 100644 --- a/include/lv2/ui/ui.h +++ b/include/lv2/ui/ui.h @@ -69,7 +69,7 @@ /** The index returned by LV2UI_Port_Map::port_index() for unknown ports. */ -#define LV2UI_INVALID_PORT_INDEX ((uint32_t)-1) +#define LV2UI_INVALID_PORT_INDEX ((uint32_t)(-1)) #ifdef __cplusplus extern "C" { |