From 33fa5f8d2fc273ede9fffbc15a62d9a5335ffe6a Mon Sep 17 00:00:00 2001 From: jadebenn Date: Sun, 17 Dec 2023 05:19:37 -0600 Subject: [PATCH] moved stringify code to dCommon --- dCommon/CMakeLists.txt | 1 + {dGame/dUtilities => dCommon}/StringifyEnums.cpp | 2 ++ {dGame/dUtilities => dCommon}/StringifyEnums.h | 0 dGame/dUtilities/CMakeLists.txt | 1 - 4 files changed, 3 insertions(+), 1 deletion(-) rename {dGame/dUtilities => dCommon}/StringifyEnums.cpp (65%) rename {dGame/dUtilities => dCommon}/StringifyEnums.h (100%) diff --git a/dCommon/CMakeLists.txt b/dCommon/CMakeLists.txt index 1354c051..454f209b 100644 --- a/dCommon/CMakeLists.txt +++ b/dCommon/CMakeLists.txt @@ -12,6 +12,7 @@ set(DCOMMON_SOURCES "NiPoint3.cpp" "NiQuaternion.cpp" "SHA512.cpp" + "StringifyEnums.h" "Demangler.cpp" "ZCompression.cpp" "BrickByBrickFix.cpp" diff --git a/dGame/dUtilities/StringifyEnums.cpp b/dCommon/StringifyEnums.cpp similarity index 65% rename from dGame/dUtilities/StringifyEnums.cpp rename to dCommon/StringifyEnums.cpp index 58d3cb95..20a088a2 100644 --- a/dGame/dUtilities/StringifyEnums.cpp +++ b/dCommon/StringifyEnums.cpp @@ -1,3 +1,5 @@ +// Source - https://mariusbancila.ro/blog/2023/08/17/how-to-convert-an-enum-to-string-in-cpp/ + #define GENERATE_ENUM_STRINGS // Start string generation #include "eGameMessageType.h" diff --git a/dGame/dUtilities/StringifyEnums.h b/dCommon/StringifyEnums.h similarity index 100% rename from dGame/dUtilities/StringifyEnums.h rename to dCommon/StringifyEnums.h diff --git a/dGame/dUtilities/CMakeLists.txt b/dGame/dUtilities/CMakeLists.txt index cb19a3eb..639f9cf4 100644 --- a/dGame/dUtilities/CMakeLists.txt +++ b/dGame/dUtilities/CMakeLists.txt @@ -5,5 +5,4 @@ set(DGAME_DUTILITIES_SOURCES "BrickDatabase.cpp" "Mail.cpp" "Preconditions.cpp" "SlashCommandHandler.cpp" - "StringifyEnums.cpp" "VanityUtilities.cpp" PARENT_SCOPE)