diff options
Diffstat (limited to 'ingen/Atom.hpp')
-rw-r--r-- | ingen/Atom.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ingen/Atom.hpp b/ingen/Atom.hpp index 86528ea1..a0e30805 100644 --- a/ingen/Atom.hpp +++ b/ingen/Atom.hpp @@ -59,7 +59,7 @@ public: memcpy(_body.ptr, &_atom, sizeof(LV2_Atom)); } if (body) { - memcpy(get_body(), body, size); + memcpy(this->body(), body, size); } } @@ -132,21 +132,21 @@ public: inline LV2_URID type() const { return _atom.type; } inline bool is_valid() const { return _atom.type; } - inline const void* get_body() const { + inline const void* body() const { return is_reference() ? (void*)(_body.ptr + 1) : &_body.val; } - inline void* get_body() { + inline void* body() { return is_reference() ? (void*)(_body.ptr + 1) : &_body.val; } template <typename T> const T& get() const { assert(size() == sizeof(T)); - return *static_cast<const T*>(get_body()); + return *static_cast<const T*>(body()); } template <typename T> const T* ptr() const { - return static_cast<const T*>(get_body()); + return static_cast<const T*>(body()); } const LV2_Atom* atom() const { |