summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/engine/LV2EventBuffer.cpp18
-rw-r--r--src/engine/LV2EventBuffer.hpp2
2 files changed, 9 insertions, 11 deletions
diff --git a/src/engine/LV2EventBuffer.cpp b/src/engine/LV2EventBuffer.cpp
index 3de70216..bec92c0e 100644
--- a/src/engine/LV2EventBuffer.cpp
+++ b/src/engine/LV2EventBuffer.cpp
@@ -85,8 +85,7 @@ LV2EventBuffer::increment() const
}
-/**
- * \return true iff the cursor is valid (ie get_event is safe)
+/** \return true iff the cursor is valid (ie get_event is safe)
*/
bool
LV2EventBuffer::is_valid() const
@@ -143,15 +142,14 @@ LV2EventBuffer::append(uint32_t frames,
/*cout << "Appending event type " << type << ", size " << size
<< " @ " << frames << "." << subframes << endl;*/
- const bool ret = lv2_event_write(&_iter, frames, subframes, type, size, data);
-
- if (!ret)
+ if (!lv2_event_write(&_iter, frames, subframes, type, size, data)) {
cerr << "ERROR: Failed to write event." << endl;
-
- _latest_frames = frames;
- _latest_subframes = subframes;
-
- return ret;
+ return false;
+ } else {
+ _latest_frames = frames;
+ _latest_subframes = subframes;
+ return true;
+ }
}
diff --git a/src/engine/LV2EventBuffer.hpp b/src/engine/LV2EventBuffer.hpp
index 7e60dff0..30edc96c 100644
--- a/src/engine/LV2EventBuffer.hpp
+++ b/src/engine/LV2EventBuffer.hpp
@@ -67,7 +67,7 @@ public:
bool append(const LV2_Event_Buffer* buf);
private:
- LV2_Event_Buffer* _data; ///< Contents
+ LV2_Event_Buffer* _data; ///< Contents
mutable LV2_Event_Iterator _iter; ///< Iterator into _data
uint32_t _latest_frames; ///< Latest time of all events (frames)
uint32_t _latest_subframes; ///< Latest time of all events (subframes)