give unions names

Mon, 30 Oct 2023 18:54:16 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 30 Oct 2023 18:54:16 +0100
changeset 5
7e1196d551ff
parent 4
b7acda6a4476
child 6
302971e8599b

give unions names

src/ascension/datatypes.h file | annotate | diff | comparison | revisions
--- a/src/ascension/datatypes.h	Mon Oct 30 18:42:09 2023 +0100
+++ b/src/ascension/datatypes.h	Mon Oct 30 18:54:16 2023 +0100
@@ -37,13 +37,13 @@
 typedef unsigned char asc_ubyte;
 typedef signed char asc_sbyte;
 
-typedef union {
+typedef union asc_vec2i {
     int data[2];
     struct { int x, y; };
     struct { int width, height; };
 } asc_vec2i;
 
-typedef union {
+typedef union asc_col4i {
     asc_ubyte data[4];
 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
     struct { asc_ubyte red, green, blue, alpha; };
@@ -52,7 +52,7 @@
 #endif
 } asc_col4i;
 
-typedef union {
+typedef union asc_col4f {
     float data[4];
 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
     struct { float red, green, blue, alpha; };

mercurial