mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 16:41:53 -07:00
internal: Make static analysis more happy (#8767)
* make functions used in 1 file static * fix invalid substr param -1 * give default initializer to borderGradier * move RASSERT from printf to std::print
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <csignal>
|
||||
#include <print>
|
||||
#include <utility>
|
||||
|
||||
#include "helpers/memory/Memory.hpp"
|
||||
@@ -49,7 +50,7 @@
|
||||
Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n{}\n\nat: line {} in {}", \
|
||||
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."); \
|
||||
std::print("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \
|
||||
raise(SIGABRT); \
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user