Liste des Groupes | Revenir à cl c |
If you want BBX_RGBA to be a typedef for an unsigned 32-bit integer, write:Shouldn't that be ... ?
typedef uint32_t BBX_RGBA;
If you want bbx_rgba() to be a function that is typesafe, correct, and efficient (for any decent compiler), write :
static inline BBX_RGBA bbx_rgba(uint32_t r, uint32_t g,
uint32_t b, uint32_t a)
{
return (r << 24) | (g << 16) | (b << 8) | a;
}
Les messages affichés proviennent d'usenet.