diff options
author | David Robillard <d@drobilla.net> | 2010-02-23 20:25:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-23 20:25:53 +0000 |
commit | 650c6d5824222a8879df5c5ba9645c264ed3b84f (patch) | |
tree | 7cd5aace00cb23622f07727ae4f7963c03dd05c9 /libs/ardour/ardour/session_event.h | |
parent | 0c20d48e7d436725396baf362368f7ce61717151 (diff) |
Fix various code quality issues found by cppcheck (e.g. uninitialized members, larger than necessary variable scope, memory leaks, etc).
git-svn-id: svn://localhost/ardour2/branches/3.0@6710 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/session_event.h')
-rw-r--r-- | libs/ardour/ardour/session_event.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index 2ce2d5225a..882142c68d 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -120,15 +120,16 @@ private: }; class SessionEventManager { - public: - SessionEventManager () : pending_events (2048){} - virtual ~SessionEventManager() {} +public: + SessionEventManager () : pending_events (2048), + auto_loop_event(0), punch_out_event(0), punch_in_event(0) {} + virtual ~SessionEventManager() {} - virtual void queue_event (SessionEvent *ev) = 0; + virtual void queue_event (SessionEvent *ev) = 0; void clear_events (SessionEvent::Type type); - - protected: - RingBuffer<SessionEvent*> pending_events; + +protected: + RingBuffer<SessionEvent*> pending_events; typedef std::list<SessionEvent *> Events; Events events; Events immediate_events; @@ -138,8 +139,8 @@ class SessionEventManager { SessionEvent *auto_loop_event; SessionEvent *punch_out_event; - SessionEvent *punch_in_event; - + SessionEvent *punch_in_event; + void dump_events () const; void merge_event (SessionEvent*); void replace_event (SessionEvent::Type, nframes64_t action_frame, nframes64_t target = 0); @@ -150,8 +151,8 @@ class SessionEventManager { void add_event (nframes64_t action_frame, SessionEvent::Type type, nframes64_t target_frame = 0); void remove_event (nframes64_t frame, SessionEvent::Type type); - virtual void process_event(SessionEvent*) = 0; - virtual void set_next_event () = 0; + virtual void process_event(SessionEvent*) = 0; + virtual void set_next_event () = 0; }; } /* namespace */ |