mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00
uniqe ptr for receiver
This commit is contained in:
parent
0972b803dd
commit
8ebc0f2644
@ -10,7 +10,8 @@
|
||||
|
||||
class MySocketTCP;
|
||||
class ServerInterface;
|
||||
class slsReceiverImplementation;
|
||||
// class slsReceiverImplementation;
|
||||
#include "slsReceiverImplementation.h"
|
||||
#include "ServerSocket.h"
|
||||
|
||||
|
||||
@ -306,7 +307,7 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
|
||||
detectorType myDetectorType;
|
||||
|
||||
/** slsReceiverBase object */
|
||||
slsReceiverImplementation *receiver{nullptr};
|
||||
std::unique_ptr<slsReceiverImplementation> receiver{nullptr};
|
||||
|
||||
/** Function List */
|
||||
int (slsReceiverTCPIPInterface::*flist[NUM_REC_FUNCTIONS])(sls::ServerInterface2& socket);
|
||||
|
@ -583,7 +583,7 @@ int slsReceiverTCPIPInterface::set_detector_type(sls::ServerInterface2 &socket){
|
||||
}
|
||||
if(ret == OK) {
|
||||
if(receiver == nullptr){
|
||||
receiver = new slsReceiverImplementation();
|
||||
receiver = sls::make_unique<slsReceiverImplementation>();
|
||||
}
|
||||
myDetectorType = arg;
|
||||
ret = receiver->setDetectorType(myDetectorType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user