* @brief Packs a 16-bit unsigned integer into a big-endian QByteArray. */
| 249 | * @brief Packs a 16-bit unsigned integer into a big-endian QByteArray. |
| 250 | */ |
| 251 | static QByteArray packU16BE(uint16_t v) |
| 252 | { |
| 253 | uint8_t out[2]; |
| 254 | big_endian_memcpy(out, &v, sizeof(v)); |
| 255 | return QByteArray(reinterpret_cast<char*>(out), sizeof(out)); |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * @brief Packs a 16-bit unsigned integer into a little-endian QByteArray. |
no test coverage detected