From 6101ca36cd4d935feb6f3f12b92fc857325917ba Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Tue, 23 Feb 2016 20:21:32 -0800 Subject: [PATCH] Use unique_ptr for baseband_buffer. --- firmware/baseband/baseband_thread.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/firmware/baseband/baseband_thread.cpp b/firmware/baseband/baseband_thread.cpp index 92b968f5..2065979d 100644 --- a/firmware/baseband/baseband_thread.cpp +++ b/firmware/baseband/baseband_thread.cpp @@ -85,7 +85,7 @@ void BasebandThread::run() { baseband_sgpio.init(); baseband::dma::init(); - const auto baseband_buffer = new std::array(); + const auto baseband_buffer = std::make_unique>(); baseband::dma::configure( baseband_buffer->data(), direction() @@ -119,8 +119,6 @@ void BasebandThread::run() { ); } } - - delete baseband_buffer; } BasebandProcessor* BasebandThread::create_processor(const int32_t mode) {