From 1ec9d950d566a55324c613672d631d53c487f728 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Fri, 18 Jan 2019 15:00:52 +0100 Subject: [PATCH] malloc to new --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 2 +- slsSupportLib/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index b9a4baef0..6c724d592 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -566,7 +566,7 @@ slsDetectorDefs::sls_detector_module* slsDetector::createModule(detectorType ty int *dacs = new int[nd]; 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->nchip = nc; myMod->nchan = nch*nc; diff --git a/slsSupportLib/CMakeLists.txt b/slsSupportLib/CMakeLists.txt index 52eb65130..01f815ed1 100644 --- a/slsSupportLib/CMakeLists.txt +++ b/slsSupportLib/CMakeLists.txt @@ -5,7 +5,6 @@ set(SOURCES src/file_utils.cpp ) - set(HEADERS )