jeudi 1 août 2019

Proper modern way of converting two uint8_t into int16_t

What's the proper modern C++ way of converting two uint8t's into one int16_t that would satisfy clang-tidy?

a[0] << 8 | a[1]

Aucun commentaire:

Enregistrer un commentaire