malloc to new

This commit is contained in:
Erik Frojdh
2019-01-18 15:00:52 +01:00
parent 1b28cc88ff
commit 1ec9d950d5
2 changed files with 1 additions and 2 deletions

View File

@ -566,7 +566,7 @@ slsDetectorDefs::sls_detector_module* slsDetector::createModule(detectorType ty
int *dacs = new int[nd]; int *dacs = new int[nd];
int *chanregs = new int[nch*nc]; int *chanregs = new int[nch*nc];
sls_detector_module *myMod = (sls_detector_module*)malloc(sizeof(sls_detector_module)); sls_detector_module *myMod = new sls_detector_module;
myMod->ndac = nd; myMod->ndac = nd;
myMod->nchip = nc; myMod->nchip = nc;
myMod->nchan = nch*nc; myMod->nchan = nch*nc;

View File

@ -5,7 +5,6 @@ set(SOURCES
src/file_utils.cpp src/file_utils.cpp
) )
set(HEADERS set(HEADERS
) )