Browse Source

Misc changes, fix build

tags/1.9.6
falkTX 10 years ago
parent
commit
9b427381ec
2 changed files with 9 additions and 2 deletions
  1. +1
    -1
      source/Makefile.mk
  2. +8
    -1
      source/includes/lv2/atom-util.h

+ 1
- 1
source/Makefile.mk View File

@@ -64,7 +64,7 @@ endif
# --------------------------------------------------------------
# Common build and link flags

BASE_FLAGS = -Wall -Wextra -pipe -DBUILDING_CARLA -DREAL_BUILD -MMD -MP
BASE_FLAGS = -Wall -Wextra -pipe -DBUILDING_CARLA -DREAL_BUILD -MD -MP
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections
LINK_OPTS += -Wl,--strip-all


+ 8
- 1
source/includes/lv2/atom-util.h View File

@@ -92,6 +92,13 @@ lv2_atom_sequence_end(const LV2_Atom_Sequence_Body* body, uint32_t size)
return (const LV2_Atom_Event*)((const uint8_t*)body + lv2_atom_pad_size(size));
}

/** Get an iterator pointing to the end of a Sequence body. */
static inline LV2_Atom_Event*
lv2_atom_sequence_end2(const LV2_Atom_Sequence_Body* body, uint32_t size)
{
return (LV2_Atom_Event*)((const uint8_t*)body + lv2_atom_pad_size(size));
}

/** Return true iff `i` has reached the end of `body`. */
static inline bool
lv2_atom_sequence_is_end(const LV2_Atom_Sequence_Body* body,
@@ -171,7 +178,7 @@ lv2_atom_sequence_append_event(LV2_Atom_Sequence* seq,
return NULL;
}

LV2_Atom_Event* e = lv2_atom_sequence_end(&seq->body, seq->atom.size);
LV2_Atom_Event* e = lv2_atom_sequence_end2(&seq->body, seq->atom.size);
memcpy(e, event, total_size);

seq->atom.size += lv2_atom_pad_size(total_size);


Loading…
Cancel
Save