From 417e7fb0026525d081009f00a89006db46896791 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Tue, 16 Jul 2024 23:15:09 +0800 Subject: [PATCH] Move __HGL_FUNC__ to Platform.h from LogInfo.h --- inc/hgl/log/LogInfo.h | 8 -------- inc/hgl/platform/Platform.h | 8 ++++++++ inc/hgl/type/_Object.h | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/inc/hgl/log/LogInfo.h b/inc/hgl/log/LogInfo.h index b80480d..88abba8 100644 --- a/inc/hgl/log/LogInfo.h +++ b/inc/hgl/log/LogInfo.h @@ -4,14 +4,6 @@ #include #include -#if (HGL_COMPILER == HGL_COMPILER_GNU)||(HGL_COMPILER == HGL_COMPILER_LLVM) - #define __HGL_FUNC__ __PRETTY_FUNCTION__ -#elif HGL_COMPILER == HGL_COMPILER_Microsoft - #define __HGL_FUNC__ __FUNCSIG__ -#else - #define __HGL_FUNC__ __FUNCTION__ -#endif// - namespace hgl { namespace logger diff --git a/inc/hgl/platform/Platform.h b/inc/hgl/platform/Platform.h index 42941be..fbf0757 100644 --- a/inc/hgl/platform/Platform.h +++ b/inc/hgl/platform/Platform.h @@ -268,5 +268,13 @@ namespace hgl #else #define HGL_INCORRECT_DIRECTORY_SEPARATOR OS_TEXT('\\') #endif// + +#if (HGL_COMPILER == HGL_COMPILER_GNU)||(HGL_COMPILER == HGL_COMPILER_LLVM) + #define __HGL_FUNC__ __PRETTY_FUNCTION__ +#elif HGL_COMPILER == HGL_COMPILER_Microsoft + #define __HGL_FUNC__ __FUNCSIG__ +#else + #define __HGL_FUNC__ __FUNCTION__ +#endif// }//namespace hgl #endif//HGL_PLATFORM_INCLUDE diff --git a/inc/hgl/type/_Object.h b/inc/hgl/type/_Object.h index 2bef05b..17b13e6 100644 --- a/inc/hgl/type/_Object.h +++ b/inc/hgl/type/_Object.h @@ -47,4 +47,6 @@ namespace hgl virtual ~IDObject()=default; }; + + #define HGL_IDOBJECT IDObject<__COUNTER__> }//namespace hgl