diff --git a/slsReceiverSoftware/src/slsReceiver.cpp b/slsReceiverSoftware/src/slsReceiver.cpp index c448f3710..112401dc6 100644 --- a/slsReceiverSoftware/src/slsReceiver.cpp +++ b/slsReceiverSoftware/src/slsReceiver.cpp @@ -11,6 +11,7 @@ #include #include +#include "container_utils.h" // For sls::make_unique<> #include "slsReceiver.h" #include "slsReceiverTCPIPInterface.h" @@ -78,17 +79,14 @@ slsReceiver::slsReceiver(int argc, char *argv[]): } // might throw an exception - //tcpipInterface = std::make_unique(tcpip_port_no); - tcpipInterface = std::unique_ptr(new slsReceiverTCPIPInterface(tcpip_port_no)); - + tcpipInterface = sls::make_unique(tcpip_port_no); } slsReceiver::slsReceiver(int tcpip_port_no) { // might throw an exception - //tcpipInterface = std::make_unique(tcpip_port_no); - tcpipInterface = std::unique_ptr(new slsReceiverTCPIPInterface(tcpip_port_no)); + tcpipInterface = sls::make_unique(tcpip_port_no); } diff --git a/slsReceiverSoftware/src/slsReceiverUsers.cpp b/slsReceiverSoftware/src/slsReceiverUsers.cpp index 0aa97fb23..572f5fe22 100644 --- a/slsReceiverSoftware/src/slsReceiverUsers.cpp +++ b/slsReceiverSoftware/src/slsReceiverUsers.cpp @@ -1,10 +1,11 @@ +#include "container_utils.h" // For sls::make_unique<> + #include "slsReceiverUsers.h" slsReceiverUsers::slsReceiverUsers(int argc, char *argv[], int &success) { // catch the exception here to limit it to within the library (for current version) try { - //receiver = std::make_unique(argc, argv); - receiver = std::unique_ptr(new slsReceiver(argc, argv)); + receiver = sls::make_unique(argc, argv); success = slsDetectorDefs::OK; } catch (...) { success = slsDetectorDefs::FAIL; @@ -12,8 +13,7 @@ slsReceiverUsers::slsReceiverUsers(int argc, char *argv[], int &success) { } slsReceiverUsers::slsReceiverUsers(int tcpip_port_no) { - //receiver = std::make_unique(tcpip_port_no); - receiver = std::unique_ptr(new slsReceiver(tcpip_port_no)); + receiver = sls::make_unique(tcpip_port_no); } int slsReceiverUsers::start() {