Fix the build for older macOS.
[dcpomatic.git] / src / lib / text_ring_buffers.cc
index 3586ab648db074a9f10ee1e91479667da478bd24..e2be7bf418a86b9fec1fc157f08a8a39c813f688 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "text_ring_buffers.h"
 
+
 using std::pair;
 using boost::optional;
+using namespace dcpomatic;
+
 
 void
-TextRingBuffers::put (pair<PlayerText, DCPTimePeriod> text)
+TextRingBuffers::put (PlayerText text, DCPTextTrack track, DCPTimePeriod period)
 {
        boost::mutex::scoped_lock lm (_mutex);
-       _data.push_back (text);
+       _data.push_back (Data(text, track, period));
 }
 
-optional<pair<PlayerText, DCPTimePeriod> >
+
+optional<TextRingBuffers::Data>
 TextRingBuffers::get ()
 {
        boost::mutex::scoped_lock lm (_mutex);
-       if (_data.empty ()) {
-               return pair<PlayerText, DCPTimePeriod>();
+       if (_data.empty()) {
+               return {};
        }
 
-       pair<PlayerText, DCPTimePeriod> r = _data.front ();
-       _data.pop_front ();
+       auto r = _data.front();
+       _data.pop_front();
        return r;
 }
 
+
 void
 TextRingBuffers::clear ()
 {