From: H. H. <hen...@gm...> - 2008-08-23 20:51:05
|
Somebody mentioned in the OpenGL forums that we should avoid the use of anonymous structures. Is this worth the concern? For example, compare these: typedef struct GLMmat2f_s { union { GLfloat m[4]; struct GLMmat2fdata_s { GLfloat m00, m01, m10, m11; }; }; } GLMmat2f; vs. typedef struct { union { GLfloat m[4]; struct { GLfloat m00, m01, m10, m11; }; }; } GLMmat2f; We need to enclose the mXX variables into a struct in order for the union to take them as a whole. -- Henri 'henux' Häkkinen |