From eaf80314d7a4b847bdd9789251190f44815c14ec Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 30 Jun 2020 10:29:39 +0200 Subject: [PATCH] Make use of std::make_unique --- src/core/monitor/CMakeLists.txt | 2 ++ src/core/monitor/gnss_synchro_monitor.cc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/monitor/CMakeLists.txt b/src/core/monitor/CMakeLists.txt index 8c508a985..dbb69470e 100644 --- a/src/core/monitor/CMakeLists.txt +++ b/src/core/monitor/CMakeLists.txt @@ -60,6 +60,8 @@ get_filename_component(PROTO_INCLUDE_HEADERS ${PROTO_HDRS} DIRECTORY) target_include_directories(core_monitor PUBLIC SYSTEM ${PROTO_INCLUDE_HEADERS} + PRIVATE + ${CMAKE_SOURCE_DIR}/src/algorithms/libs # for gnss_sdr_make_unique ) if(GNURADIO_USES_STD_POINTERS) diff --git a/src/core/monitor/gnss_synchro_monitor.cc b/src/core/monitor/gnss_synchro_monitor.cc index a96f52bd2..442a16b8c 100644 --- a/src/core/monitor/gnss_synchro_monitor.cc +++ b/src/core/monitor/gnss_synchro_monitor.cc @@ -21,6 +21,7 @@ */ #include "gnss_synchro_monitor.h" +#include "gnss_sdr_make_unique.h" #include "gnss_synchro.h" #include #include @@ -52,7 +53,7 @@ gnss_synchro_monitor::gnss_synchro_monitor(unsigned int n_channels, d_decimation_factor = decimation_factor; d_nchannels = n_channels; - udp_sink_ptr = std::unique_ptr(new Gnss_Synchro_Udp_Sink(udp_addresses, udp_port, enable_protobuf)); + udp_sink_ptr = std::make_unique(udp_addresses, udp_port, enable_protobuf); count = 0; }