summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/export_timespan.h
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2011-06-11 14:14:24 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2011-06-11 14:14:24 +0000
commit7468fdb9ca9892cec9b298690bf0edf3655d6453 (patch)
treeabff397fae4e6f8c0f51a7ae71c097b6f0ad2271 /libs/ardour/ardour/export_timespan.h
parent47e2b9db77ff88b0b15f942e751e56322a2887e6 (diff)
Typedef all globally used export smart pointer types in one file.
Some of them need to be ordered in STL containers, and thus need a special comparable wrapper for boost::shared_ptr, defined in comparable_shared_ptr.h. This also alleviates the typedef hell present earlier in some export classes :) Making the timespan pointer comparable should fix bug #4093 git-svn-id: svn://localhost/ardour2/branches/3.0@9702 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/export_timespan.h')
-rw-r--r--libs/ardour/ardour/export_timespan.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h
index ba31fd6f6a..9273aab6c7 100644
--- a/libs/ardour/ardour/export_timespan.h
+++ b/libs/ardour/ardour/export_timespan.h
@@ -58,6 +58,13 @@ class ExportTimespan
framepos_t get_start () const { return start_frame; }
framepos_t get_end () const { return end_frame; }
+ /// Primarily compare start time, then end time
+ bool operator< (ExportTimespan const & other) {
+ if (start_frame < other.start_frame) { return true; }
+ if (start_frame > other.start_frame) { return false; }
+ return end_frame < other.end_frame;
+ }
+
private:
ExportStatusPtr status;