Use make_shared<>.
[dcpomatic.git] / src / lib / audio_delay.cc
index 893773ddd27a5304539ff3d2e0d95f59f7394cb7..e33d9879b1f2fe20064e93cbcbff8688c277e69d 100644 (file)
 #include "audio_delay.h"
 #include "audio_buffers.h"
 #include "dcpomatic_assert.h"
+#include <boost/make_shared.hpp>
 #include <iostream>
 
 using std::cout;
 using boost::shared_ptr;
+using boost::make_shared;
 
 AudioDelay::AudioDelay (int samples)
        : _samples (samples)
@@ -38,7 +40,7 @@ AudioDelay::run (shared_ptr<const AudioBuffers> in)
        /* You can't call this with varying channel counts */
        DCPOMATIC_ASSERT (!_tail || in->channels() == _tail->channels());
 
-       shared_ptr<AudioBuffers> out (new AudioBuffers (in->channels(), in->frames()));
+       shared_ptr<AudioBuffers> out = make_shared<AudioBuffers> (in->channels(), in->frames());
 
        if (in->frames() > _samples) {