Use make_shared<>.
[dcpomatic.git] / src / lib / audio_filter.cc
index 44345fc9d11f4e817865a402266d2b2bedff1b41..4203d074c148be49a25ee610e19c1b3574ebf9bd 100644 (file)
 
 #include "audio_filter.h"
 #include "audio_buffers.h"
+#include <boost/make_shared.hpp>
 #include <cmath>
 
 using std::min;
 using boost::shared_ptr;
+using boost::make_shared;
 
 /** @return array of floats which the caller must destroy with delete[] */
 float *
@@ -75,7 +77,7 @@ AudioFilter::~AudioFilter ()
 shared_ptr<AudioBuffers>
 AudioFilter::run (shared_ptr<const AudioBuffers> in)
 {
-       shared_ptr<AudioBuffers> out (new AudioBuffers (in->channels(), in->frames()));
+       shared_ptr<AudioBuffers> out = make_shared<AudioBuffers> (in->channels(), in->frames());
 
        if (!_tail) {
                _tail.reset (new AudioBuffers (in->channels(), _M + 1));