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