Skip to main content
1 of 2
barak manos
  • 1.2k
  • 1
  • 7
  • 19

I would change this:

static constexpr uint8_t endianValues[4] = {0, 1, 2, 3};

To this:

static const uint32_t value = HL_LITTLE_ENDIAN; // 0x03020100
static const uint8_t* endianValues = (uint8_t*)&value;
barak manos
  • 1.2k
  • 1
  • 7
  • 19