summaryrefslogtreecommitdiff
path: root/libs/evoral/src/Event.cpp
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2009-02-03 08:46:44 +0000
committerHans Baier <hansfbaier@googlemail.com>2009-02-03 08:46:44 +0000
commitdb77cb9212f3e42030bd65555185c7b53453e634 (patch)
tree6ef93167a274824c673c732f5772630a21a80983 /libs/evoral/src/Event.cpp
parent5c73fc42c46ffd82789eef6647a820fe6b24d0e7 (diff)
* more pleasant template parameter names in (MIDI)Event
git-svn-id: svn://localhost/ardour2/branches/3.0@4487 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/src/Event.cpp')
-rw-r--r--libs/evoral/src/Event.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/libs/evoral/src/Event.cpp b/libs/evoral/src/Event.cpp
index 1f1460655f..532b8b498a 100644
--- a/libs/evoral/src/Event.cpp
+++ b/libs/evoral/src/Event.cpp
@@ -22,26 +22,26 @@ namespace Evoral {
#ifdef EVORAL_EVENT_ALLOC
-template<typename T>
-Event<T>::Event(uint32_t tid, T t, uint32_t s, uint8_t* b, bool owns_buf)
- : _type(tid)
- , _time(t)
- , _size(s)
- , _buf(b)
- , _owns_buf(owns_buf)
+template<typename Timestamp>
+Event<Timestamp>::Event(EventType type, Timestamp timestamp, uint32_t size, uint8_t* buffer, bool alloc)
+ : _type(type)
+ , _time(timestamp)
+ , _size(size)
+ , _buf(buffer)
+ , _owns_buf(alloc)
{
- if (owns_buf) {
+ if (alloc) {
_buf = (uint8_t*)malloc(_size);
- if (b) {
- memcpy(_buf, b, _size);
+ if (buffer) {
+ memcpy(_buf, buffer, _size);
} else {
memset(_buf, 0, _size);
}
}
}
-template<typename T>
-Event<T>::Event(const Event& copy, bool owns_buf)
+template<typename Timestamp>
+Event<Timestamp>::Event(const Event& copy, bool owns_buf)
: _type(copy._type)
, _time(copy._time)
, _size(copy._size)
@@ -58,8 +58,8 @@ Event<T>::Event(const Event& copy, bool owns_buf)
}
}
-template<typename T>
-Event<T>::~Event() {
+template<typename Timestamp>
+Event<Timestamp>::~Event() {
if (_owns_buf) {
free(_buf);
}