From 9058b6bbcc95f00abc604f3290dfc70d0722bc85 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 3 Sep 2019 14:11:54 -0400 Subject: [PATCH] CColor: Use using where applicable We can also simplify RGBA32's declaration. This also allows the type to be forward declared. --- include/zeus/CColor.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/zeus/CColor.hpp b/include/zeus/CColor.hpp index 6203eb1..76ee081 100644 --- a/include/zeus/CColor.hpp +++ b/include/zeus/CColor.hpp @@ -25,16 +25,16 @@ #endif namespace zeus { -typedef uint8_t Comp8; -typedef uint32_t Comp32; +using Comp8 = uint8_t; +using Comp32 = uint32_t; constexpr float OneOver255 = 1.f / 255.f; -typedef union { +union RGBA32 { struct { Comp8 r, g, b, a; }; Comp32 rgba; -} RGBA32; +}; class CVector4f;