clang-tidy

This commit is contained in:
Erik Frojdh 2019-05-03 14:15:13 +02:00
parent 4f13b29c7f
commit aaa7576f7d

View File

@ -587,13 +587,13 @@ void slsDetector::updateTotalNumberOfChannels() {
int adatabytes = 0, ddatabytes = 0; int adatabytes = 0, ddatabytes = 0;
// analog channels (normal, analog/digital readout) // analog channels (normal, analog/digital readout)
if (shm()->roFlags == slsDetectorDefs::NORMAL_READOUT || if (shm()->roFlags == slsDetectorDefs::NORMAL_READOUT ||
shm()->roFlags & slsDetectorDefs::ANALOG_AND_DIGITAL) { ((shm()->roFlags & slsDetectorDefs::ANALOG_AND_DIGITAL) != 0)) {
uint32_t mask = shm()->adcEnableMask; uint32_t mask = shm()->adcEnableMask;
if (mask == BIT32_MASK) { if (mask == BIT32_MASK) {
nachans = 32; nachans = 32;
} else { } else {
for (int ich = 0; ich < 32; ++ich) { for (int ich = 0; ich < 32; ++ich) {
if (mask & (1 << ich)) if ((mask & (1 << ich)) != 0u)
++nachans; ++nachans;
} }
} }
@ -605,7 +605,7 @@ void slsDetector::updateTotalNumberOfChannels() {
// digital channels (ctb only, digital, analog/digital readout) // digital channels (ctb only, digital, analog/digital readout)
if (shm()->myDetectorType == CHIPTESTBOARD && if (shm()->myDetectorType == CHIPTESTBOARD &&
((shm()->roFlags & DIGITAL_ONLY) || (shm()->roFlags & ANALOG_AND_DIGITAL))) { (((shm()->roFlags & DIGITAL_ONLY) != 0) || ((shm()->roFlags & ANALOG_AND_DIGITAL) != 0))) {
ndchans = 64; ndchans = 64;
ddatabytes = (sizeof(uint64_t) * shm()->timerValue[DIGITAL_SAMPLES]); ddatabytes = (sizeof(uint64_t) * shm()->timerValue[DIGITAL_SAMPLES]);
FILE_LOG(logDEBUG1) << "#Digital Channels:" << ndchans FILE_LOG(logDEBUG1) << "#Digital Channels:" << ndchans