switch from std::auto_ptr<> (deprecated) to boost::scoped_ptr<>
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 26 Oct 2017 19:43:08 +0000 (15:43 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 26 Oct 2017 19:43:08 +0000 (15:43 -0400)
libs/ardour/disk_reader.cc

index dd6c3ee09d1bf78e509cd968355c8b234c5a32eb..8421c04894441de3a49011256b47fd066f8738dd 100644 (file)
@@ -17,6 +17,8 @@
 
 */
 
+#include <boost/smart_ptr/scoped_ptr.hpp>
+
 #include "pbd/enumwriter.h"
 #include "pbd/memento_command.h"
 
@@ -545,8 +547,8 @@ DiskReader::overwrite_existing_buffers ()
                /* assume all are the same size */
                samplecnt_t size = c->front()->buf->bufsize();
 
-               std::auto_ptr<Sample> mixdown_buffer (new Sample[size]);
-               std::auto_ptr<float> gain_buffer (new float[size]);
+               boost::scoped_ptr<Sample> mixdown_buffer (new Sample[size]);
+               boost::scoped_ptr<float> gain_buffer (new float[size]);
 
                /* reduce size so that we can fill the buffer correctly (ringbuffers
                   can only handle size-1, otherwise they appear to be empty)
@@ -836,8 +838,8 @@ DiskReader::_do_refill_with_alloc (bool partial_fill)
        */
 
        {
-               std::auto_ptr<Sample> mix_buf (new Sample[2*1048576]);
-               std::auto_ptr<float>  gain_buf (new float[2*1048576]);
+               boost::scoped_ptr<Sample> mix_buf (new Sample[2*1048576]);
+               boost::scoped_ptr<float>  gain_buf (new float[2*1048576]);
 
                int ret = refill_audio (mix_buf.get(), gain_buf.get(), (partial_fill ? _chunk_samples : 0));