summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-03-04 15:24:36 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-03-04 15:24:36 +0100
commit925f22933f1a6f96d3a7ed9cab286b8db44b84f6 (patch)
tree5fc63a4ff3fbf7ded5132133fdf1123e0ea72641
parentd5cd7d31c92593c593c8c809588284d61316c2ec (diff)
compat/macros: add function name macro
-rw-r--r--compat/macros.hpp5
-rw-r--r--logic/pipeline.cpp8
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 \