From 925f22933f1a6f96d3a7ed9cab286b8db44b84f6 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 4 Mar 2018 15:24:36 +0100 Subject: compat/macros: add function name macro --- compat/macros.hpp | 5 +++++ logic/pipeline.cpp | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compat/macros.hpp b/compat/macros.hpp index df71b1f3..c8fbca20 100644 --- a/compat/macros.hpp +++ b/compat/macros.hpp @@ -47,3 +47,8 @@ # define unlikely(x) (x) #endif +#if defined _MSC_VER +# define OTR_FUNNAME (__FUNCSIG__) +#else +# define OTR_FUNNAME (__PRETTY_FUNCTION__) +#endif diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index f691a653..05719351 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -15,6 +15,7 @@ #include "compat/sleep.hpp" #include "compat/math.hpp" #include "compat/meta.hpp" +#include "compat/macros.hpp" #include "pipeline.hpp" #include "logic/shortcuts.h" @@ -235,13 +236,6 @@ bool maybe_nan(const char* text, const char* fun, int line, const xs&... vals) return false; } -#if defined _MSC_VER -# define OTR_FUNNAME2 (__FUNCSIG__) -#else -# define OTR_FUNNAME2 (__PRETTY_FUNCTION__) -#endif -// don't expand -# define OTR_FUNNAME (OTR_FUNNAME2) #define nan_check(...) \ do \ -- cgit v1.2.3