Remove dead code
authorDavid Robillard <d@drobilla.net>
Mon, 7 Nov 2016 12:07:42 +0000 (07:07 -0500)
committerDavid Robillard <d@drobilla.net>
Sat, 3 Dec 2016 20:28:23 +0000 (15:28 -0500)
libs/evoral/evoral/Event.hpp
libs/evoral/src/Event.cpp

index 696fb995ab3c358d63466b37b86bdc74d0bbb89e..e921f1662d2d253c26b3e762a3fa6895cc03cd79 100644 (file)
@@ -67,10 +67,7 @@ public:
        void set(const uint8_t* buf, uint32_t size, Time t);
 
        inline bool operator==(const Event& other) const {
-               if (_type          != other._type ||
-                   _nominal_time  != other._nominal_time ||
-                   _original_time != other._original_time ||
-                   _size          != other._size) {
+               if (_type != other._type || _time != other._time || _size != other._size) {
                        return false;
                }
                return !memcmp(_buf, other._buf, _size);
@@ -108,26 +105,23 @@ public:
        }
 
        inline void clear() {
-               _type          = NO_EVENT;
-               _original_time = Time();
-               _nominal_time  = Time();
-               _size          = 0;
-               _buf           = NULL;
+               _type = NO_EVENT;
+               _time = Time();
+               _size = 0;
+               _buf  = NULL;
        }
 
 #endif // EVORAL_EVENT_ALLOC
 
        inline EventType      event_type()    const { return _type; }
-       inline Time           time()          const { return _nominal_time; }
-       inline Time           original_time() const { return _original_time; }
+       inline Time           time()          const { return _time; }
        inline uint32_t       size()          const { return _size; }
        inline const uint8_t* buffer()        const { return _buf; }
        inline uint8_t*       buffer()              { return _buf; }
 
        inline void set_event_type(EventType t) { _type = t; }
 
-       void set_time(Time);
-       void set_original_time(Time);
+       inline void set_time(Time t) { _time = t; }
 
        inline event_id_t id() const           { return _id; }
        inline void       set_id(event_id_t n) { _id = n; }
@@ -194,14 +188,13 @@ public:
        }
 
 protected:
-       EventType  _type;           ///< Type of event (application relative, NOT MIDI 'type')
-       Time       _original_time;  ///< Time stamp of event
-       Time       _nominal_time;   ///< Quantized version of _time, used in preference
-       uint32_t   _size;           ///< Size of buffer in bytes
-       uint8_t*   _buf;            ///< Event contents (e.g. raw MIDI data)
-       event_id_t _id;             ///< Unique event ID
+       EventType  _type;      ///< Type of event (application relative, NOT MIDI 'type')
+       Time       _time;      ///< Time stamp of event
+       uint32_t   _size;      ///< Size of buffer in bytes
+       uint8_t*   _buf;       ///< Event contents (e.g. raw MIDI data)
+       event_id_t _id;        ///< Unique event ID
 #ifdef EVORAL_EVENT_ALLOC
-       bool       _owns_buf;       ///< Whether buffer is locally allocated
+       bool       _owns_buf;  ///< Whether buffer is locally allocated
 #endif
 };
 
index 09b240284f6884bba207aab16a947f20ec5ab442..13d7c6c6acd2d3e6c2e656c60c5faf3cbd75d3c0 100644 (file)
@@ -57,8 +57,7 @@ next_event_id ()
 template<typename Timestamp>
 Event<Timestamp>::Event(EventType type, Timestamp time, uint32_t size, uint8_t* buf, bool alloc)
        : _type(type)
-       , _original_time(time)
-       , _nominal_time(time)
+       , _time(time)
        , _size(size)
        , _buf(buf)
        , _id(-1)
@@ -80,8 +79,7 @@ Event<Timestamp>::Event(EventType      type,
                         uint32_t       size,
                         const uint8_t* buf)
        : _type(type)
-       , _original_time(time)
-       , _nominal_time(time)
+       , _time(time)
        , _size(size)
        , _buf((uint8_t*)malloc(size))
        , _id(-1)
@@ -93,8 +91,7 @@ Event<Timestamp>::Event(EventType      type,
 template<typename Timestamp>
 Event<Timestamp>::Event(const Event& copy, bool owns_buf)
        : _type(copy._type)
-       , _original_time(copy._original_time)
-       , _nominal_time(copy._nominal_time)
+       , _time(copy._time)
        , _size(copy._size)
        , _buf(copy._buf)
        , _id (next_event_id ())
@@ -123,8 +120,7 @@ Event<Timestamp>::assign(const Event& other)
 {
        _id = other._id;
        _type = other._type;
-       _original_time = other._original_time;
-       _nominal_time = other._nominal_time;
+       _time = other._time;
        _owns_buf = other._owns_buf;
        if (_owns_buf) {
                if (other._buf) {
@@ -160,25 +156,10 @@ Event<Timestamp>::set (const uint8_t* buf, uint32_t size, Timestamp t)
                _buf = const_cast<uint8_t*> (buf);
        }
 
-       _original_time = t;
-       _nominal_time = t;
+       _time = t;
        _size = size;
 }
 
-template<typename Timestamp>
-void
-Event<Timestamp>::set_time (Timestamp t)
-{
-       _nominal_time = t;
-}
-
-template<typename Timestamp>
-void
-Event<Timestamp>::set_original_time (Timestamp t)
-{
-       _original_time = t;
-}
-
 #endif // EVORAL_EVENT_ALLOC
 
 template class Event<Evoral::Beats>;