From 8589a86c50275a53276e468d150737e395a04e4e Mon Sep 17 00:00:00 2001 From: rodri Date: Sat, 11 Nov 2023 10:32:29 +0000 Subject: removed unnecessary anonymous union in OBJVertex. --- obj.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/obj.h b/obj.h index 19bfdcb..83e80dc 100644 --- a/obj.h +++ b/obj.h @@ -26,7 +26,7 @@ enum { OBJHTSIZE = 17 }; -typedef struct OBJVertex OBJVertex; +typedef union OBJVertex OBJVertex; typedef struct OBJVertexArray OBJVertexArray; typedef struct OBJElem OBJElem; //typedef struct OBJGroup OBJGroup; @@ -35,13 +35,11 @@ typedef struct OBJ OBJ; #pragma varargck type "O" OBJ* -struct OBJVertex +union OBJVertex { - union { - struct { double x, y, z, w; }; /* geometric */ - struct { double u, v, vv; }; /* texture and parametric */ - struct { double i, j, k; }; /* normal */ - }; + struct { double x, y, z, w; }; /* geometric */ + struct { double u, v, vv; }; /* texture and parametric */ + struct { double i, j, k; }; /* normal */ }; struct OBJVertexArray -- cgit v1.2.3