summaryrefslogtreecommitdiff
path: root/src/defines.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-28 16:10:30 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-28 16:10:30 +0200
commit17e88bf059b1c1435c664b30191b151bbafea236 (patch)
treec714532d2be054bbbbe451f2cc3593c59ba30651 /src/defines.hpp
parent144a79ee00951ed175a9ea3ebc28eb821f855138 (diff)
log signals
Diffstat (limited to 'src/defines.hpp')
-rw-r--r--src/defines.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/defines.hpp b/src/defines.hpp
index e12aa53a..0fbaa795 100644
--- a/src/defines.hpp
+++ b/src/defines.hpp
@@ -1,5 +1,6 @@
#include "includes.hpp"
#include "debug/Log.hpp"
+#include "helpers/MiscFunctions.hpp"
#ifndef NDEBUG
#define ISDEBUG true
@@ -26,10 +27,14 @@
#define HYPRATOM(name) {name, 0}
+#ifndef __INTELLISENSE__
#define RASSERT(expr, reason) \
if (!expr) { \
Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n%s\n\nat: line %d in %s", std::string(reason).c_str(), __LINE__, ([]() constexpr->std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })().c_str()); \
RIP("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \
}
+#else
+#define RASSERT(expr, reason)
+#endif
#define ASSERT(expr) RASSERT(expr, "?") \ No newline at end of file