Replace "%z" modifier with glib macro for portability.
[ardour.git] / libs / evoral / evoral / Event.hpp
index 59e5612e0e54c42f0401531e49a50af95fa5ad4a..ec92d575d0958b0cf18328b80207d60db6af21ba 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef EVORAL_EVENT_HPP
 #define EVORAL_EVENT_HPP
 
-#include <assert.h>
 #include <cstdlib>
 #include <cstring>
 #include <sstream>
@@ -48,7 +47,9 @@ template<typename Time>
 class LIBEVORAL_API Event {
 public:
 #ifdef EVORAL_EVENT_ALLOC
-       Event (EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false);
+       Event (EventType type=0, Time time=Time(), uint32_t size=0, uint8_t* buf=NULL, bool alloc=false);
+
+       Event (EventType type, Time time, uint32_t size, const uint8_t* buf);
 
        /** Copy \a copy.
         *
@@ -114,11 +115,11 @@ public:
        }
 
        inline void clear() {
-               _type = 0;
-               _original_time = 0;
-               _nominal_time = 0;
-               _size = 0;
-               _buf  = NULL;
+               _type          = 0;
+               _original_time = Time();
+               _nominal_time  = Time();
+               _size          = 0;
+               _buf           = NULL;
        }
 
 #else
@@ -154,9 +155,6 @@ protected:
 #endif
 };
 
-} // namespace Evoral
-
-
 template<typename Time>
 /*LIBEVORAL_API*/ std::ostream& operator<<(std::ostream& o, const Evoral::Event<Time>& ev) {
        o << "Event #" << ev.id() << " type = " << ev.event_type() << " @ " << ev.time();
@@ -168,6 +166,7 @@ template<typename Time>
        return o;
 }
 
+} // namespace Evoral
 
 #endif // EVORAL_EVENT_HPP