mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 08:38:00 +02:00
Add slsReceiverUsers(int tcpip_port_no) overload
Use std::unique_ptr<> instead of raw pointers
This commit is contained in:
@ -78,14 +78,17 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
|
||||
}
|
||||
|
||||
// might throw an exception
|
||||
tcpipInterface = new slsReceiverTCPIPInterface(tcpip_port_no);
|
||||
//tcpipInterface = std::make_unique<slsReceiverTCPIPInterface>(tcpip_port_no);
|
||||
tcpipInterface = std::unique_ptr<slsReceiverTCPIPInterface>(new slsReceiverTCPIPInterface(tcpip_port_no));
|
||||
|
||||
}
|
||||
|
||||
|
||||
slsReceiver::~slsReceiver() {
|
||||
if(tcpipInterface)
|
||||
delete tcpipInterface;
|
||||
slsReceiver::slsReceiver(int tcpip_port_no)
|
||||
{
|
||||
// might throw an exception
|
||||
//tcpipInterface = std::make_unique<slsReceiverTCPIPInterface>(tcpip_port_no);
|
||||
tcpipInterface = std::unique_ptr<slsReceiverTCPIPInterface>(new slsReceiverTCPIPInterface(tcpip_port_no));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user