summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-09-11 18:00:19 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-09-11 18:00:19 +0200
commitecff424e9c78418f6d2bd79b7d4f50f42c29860e (patch)
tree6507ff17581a11547af91b3f0e166efcb136e174 /dev
parent51023240ae3d6093c8c8fbe1ca8228bbddb54e0a (diff)
fix: SystemKit/Verify.h: fix future link issues with `inline`
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev')
-rw-r--r--dev/libSystem/SystemKit/Verify.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/libSystem/SystemKit/Verify.h b/dev/libSystem/SystemKit/Verify.h
index 68e75d47..cbf85830 100644
--- a/dev/libSystem/SystemKit/Verify.h
+++ b/dev/libSystem/SystemKit/Verify.h
@@ -15,7 +15,7 @@ namespace LibSystem::Detail {
/// @author 0xf00sec, and Amlal El Mahrouss
/// @brief safe cast operator.
template <typename T, typename R = VoidPtr>
-static R sys_safe_cast(const T* ptr) {
+inline R sys_safe_cast(const T* ptr) {
_rtl_assert(ptr, "safe cast failed!");
return static_cast<R>(const_cast<T*>(ptr));
}
@@ -33,7 +33,7 @@ struct must_cast_traits<T, T> {
/// @author Amlal El Mahrouss
/// @brief Safe constexpr cast.
template <typename T, typename R>
-constexpr R* sys_constexpr_cast(T* ptr) {
+inline constexpr R* sys_constexpr_cast(T* ptr) {
static_assert(must_cast_traits<T, R>::value, "constexpr cast failed! types are a mismatch!");
return static_cast<R*>(ptr);
}