From 603b217b54324c6e48afeb0ed9b2d97fbaf009c1 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Fri, 18 Jan 2019 15:15:39 +0100 Subject: [PATCH] clang-tidy modernize --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 14 +++++++------- slsDetectorSoftware/slsDetector/slsDetector.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 9468f3ffb..d489d8a42 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -11,15 +11,15 @@ #include "MySocketTCP.h" -#include -#include -#include #include #include +#include #include -#include #include +#include +#include #include +#include #define DEFAULT_HOSTNAME "localhost" @@ -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 = new sls_detector_module; + auto *myMod = new sls_detector_module; myMod->ndac = nd; myMod->nchip = nc; myMod->nchan = nch*nc; @@ -4795,7 +4795,7 @@ slsDetectorDefs::frameDiscardPolicy slsDetector::setReceiverFramesDiscardPolicy( int fnum = F_RECEIVER_DISCARD_POLICY; int ret = FAIL; int arg = (int)f; - frameDiscardPolicy retval = (frameDiscardPolicy)-1; + auto retval = (frameDiscardPolicy)-1; FILE_LOG(logDEBUG1) << "Setting receiver frames discard policy to " << arg; if (thisDetector->receiverOnlineFlag == ONLINE_FLAG && connectData() == OK) { @@ -4848,7 +4848,7 @@ slsDetectorDefs::fileFormat slsDetector::setFileFormat(fileFormat f) { int fnum = F_SET_RECEIVER_FILE_FORMAT; int ret = FAIL; int arg = f; - fileFormat retval = (fileFormat)-1; + auto retval = (fileFormat)-1; FILE_LOG(logDEBUG1) << "Setting receiver file format to " << arg; if (thisDetector->receiverOnlineFlag == ONLINE_FLAG && connectData() == OK) { diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index 20b10a02d..ee1933ef1 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -13,7 +13,7 @@ #include "error_defs.h" #include "logger.h" -#include "math.h" +#include class multiSlsDetector; class SharedMemory;