File tree Expand file tree Collapse file tree
DataFormats/Detectors/TPC/include/DataFormatsTPC Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515#ifndef ALICEO2_DATAFORMATSTPC_CLUSTERNATIVE_H
1616#define ALICEO2_DATAFORMATSTPC_CLUSTERNATIVE_H
1717#ifndef GPUCA_GPUCODE_DEVICE
18+ #include < climits>
1819#include < cstdint>
1920#include < cstddef> // for size_t
2021#include < utility>
@@ -63,7 +64,7 @@ struct ClusterNative {
6364 static constexpr int scaleSigmaTimePacked = 32 ; // 1/32nd of pad/timebin precision for cluster size
6465 static constexpr int scaleSigmaPadPacked = 32 ;
6566 static constexpr int scaleSaturatedQTot = 4 ;
66- static constexpr int maxSaturatedQTot = UINT16_MAX * scaleSaturatedQTot;
67+ static constexpr int maxSaturatedQTot = USHRT_MAX * scaleSaturatedQTot;
6768
6869 uint32_t timeFlagsPacked; // < Contains the time in the lower 24 bits in a packed format, contains the flags in the
6970 // upper 8 bits
@@ -90,7 +91,7 @@ struct ClusterNative {
9091 if (isSaturated ()) [[unlikely]] {
9192 // Check for overflow, so return type can stay uint16
9293 auto sqtot = getSaturatedQtot ();
93- return sqtot <= UINT16_MAX ? sqtot : UINT16_MAX;
94+ return sqtot <= USHRT_MAX ? sqtot : UINT16_MAX;
9495 }
9596 return qTot;
9697 }
You can’t perform that action at this time.
0 commit comments