summaryrefslogtreecommitdiff
path: root/src/macros.hpp
diff options
context:
space:
mode:
authormemchr <118117622+memchr@users.noreply.github.com>2023-09-20 07:26:20 +0000
committerGitHub <noreply@github.com>2023-09-20 08:26:20 +0100
commit6594b50e57935dd66930ccd35dba7a1b4131399d (patch)
tree17d4fa7aabf0e447c7171346c5b851c999093149 /src/macros.hpp
parentd8d0cd75c2db16a14086e1d5119ed937a60c701e (diff)
logging/format: use std::format_string to catch formatting string errors at compile time (#3377)
* fix(log): use constexpr format string * deprecate getFormat
Diffstat (limited to 'src/macros.hpp')
-rw-r--r--src/macros.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/macros.hpp b/src/macros.hpp
index 3f0a9ebc..b4fe72d1 100644
--- a/src/macros.hpp
+++ b/src/macros.hpp
@@ -58,8 +58,8 @@
#define RASSERT(expr, reason, ...) \
if (!(expr)) { \
Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n{}\n\nat: line {} in {}", \
- getFormat(reason, ##__VA_ARGS__), __LINE__, \
- ([]() constexpr->std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })()); \
+ std::format(reason, ##__VA_ARGS__), __LINE__, \
+ ([]() constexpr -> std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })()); \
printf("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \
raise(SIGABRT); \
}