static_assert enum size

This commit is contained in:
Erik Frojdh
2020-08-06 11:50:35 +02:00
parent b51290d0fe
commit 132043a70d
2 changed files with 8 additions and 9 deletions

View File

@ -135,6 +135,8 @@ class slsDetectorDefs {
} sls_detector_header;
#ifdef __cplusplus
//For sending and receiving data
static_assert(sizeof(detectorType) == sizeof(int), "enum and int differ in size");
#define MAX_NUM_PACKETS 512
using sls_bitset = std::bitset<MAX_NUM_PACKETS>;
using bitset_storage = uint8_t[MAX_NUM_PACKETS / 8];