From 5320496cc7bde4b83ac263111de9acf775d9dc48 Mon Sep 17 00:00:00 2001 From: Unnamed Date: Tue, 19 Feb 2019 11:32:44 +0000 Subject: [PATCH] playerlist.hpp: assert size of rgba_t is same as 4 floats This assertion is here to ensure in the future we won't have silent incompatibilities between no visual and visual player lists --- include/playerlist.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/playerlist.hpp b/include/playerlist.hpp index 33f2edb2..6f048982 100644 --- a/include/playerlist.hpp +++ b/include/playerlist.hpp @@ -26,6 +26,7 @@ enum class k_EState }; #if ENABLE_VISUALS extern rgba_t k_Colors[]; +static_assert(sizeof(rgba_t) == sizeof(float) * 4, "player list is going to be incompatible with no visual version"); #endif const std::string k_Names[] = { "DEFAULT", "FRIEND", "RAGE", "IPC", "DEVELOPER", "CAT" }; const char *const k_pszNames[] = { "DEFAULT", "FRIEND", "RAGE", "IPC", "DEVELOPER", "CAT" };