C++ (Qt)void ThreeInt2Bool( const int src[3], bool dst[48] ){ int pos = 0; for (int i = 0; i < 3; ++i) for (int j = 0; j < 16; ++j) dst[pos++] = (src[i] >> j) & 1;}
QByteArray ba;QList<int> ia = {0x00FFFF0F, 0x00FF0000, 0x00FFFF00};for(int i=0; i < 3; ++i) { ba.append(ia[i] & 0x00FF).append((ia[i] >> 8) & 0xFF);
C++ (Qt)void ThreeInt2Bool( const int src[3], bool dst[48] ){ for (int i = 0; i < 48; ++i) dst[i] = (src[i/16] >> (i%16)) & 1;}
C++ (Qt)constexpr bitset<48> bits(uint16_t i1, uint16_t i2, uint16_t i3) { return {uint64_t(i1) << 32 | uint64_t(i2) << 16 | i3};}