C++11 cleanup.
authorCarl Hetherington <cth@carlh.net>
Wed, 31 Mar 2021 23:25:01 +0000 (01:25 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 31 Mar 2021 23:25:01 +0000 (01:25 +0200)
src/lib/butler.cc
src/lib/ffmpeg_encoder.cc

index d4da787ddfb741595fdaa5ddae803203b0b15394..37e8c95443021e3c7d70c174e3839f12fbcb24fa 100644 (file)
@@ -307,7 +307,7 @@ void
 Butler::prepare (weak_ptr<PlayerVideo> weak_video)
 try
 {
-       shared_ptr<PlayerVideo> video = weak_video.lock ();
+       auto video = weak_video.lock ();
        /* If the weak_ptr cannot be locked the video obviously no longer requires any work */
        if (video) {
                LOG_TIMING("start-prepare in %1", thread_id());
@@ -363,7 +363,7 @@ Butler::audio (shared_ptr<AudioBuffers> audio, DCPTime time, int frame_rate)
 optional<DCPTime>
 Butler::get_audio (float* out, Frame frames)
 {
-       optional<DCPTime> t = _audio.get (out, _audio_channels, frames);
+       auto t = _audio.get (out, _audio_channels, frames);
        _summon.notify_all ();
        return t;
 }
index 5f29b64da51b498e8a656bc56cce9933f365ef70..fc0d5eab26350f8ee6d257043b9ff2da12a64bf4 100644 (file)
@@ -181,7 +181,7 @@ FFmpegEncoder::go ()
                        if (!v.first) {
                                throw DecodeError(String::compose("Error during decoding: %1", e.summary()));
                        }
-                       shared_ptr<FFmpegFileEncoder> fe = encoder->get (v.first->eyes());
+                       auto fe = encoder->get (v.first->eyes());
                        if (fe) {
                                fe->video(v.first, v.second);
                        }
@@ -194,7 +194,7 @@ FFmpegEncoder::go ()
                        _last_time = i;
                }
 
-               shared_ptr<Job> job = _job.lock ();
+               auto job = _job.lock ();
                if (job) {
                        job->set_progress (float(i.get()) / _film->length().get());
                }