From 9e746d42d2e3faa526f12ba222f5ee6924dd30f9 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 26 Dec 2025 10:08:33 +0100 Subject: feat! breaking API changes, use header guards and libSystem fixes. Signed-off-by: Amlal El Mahrouss --- src/libSystem/SystemKit/Verify.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libSystem/SystemKit/Verify.h') diff --git a/src/libSystem/SystemKit/Verify.h b/src/libSystem/SystemKit/Verify.h index c584ac82..0bdfd2ca 100644 --- a/src/libSystem/SystemKit/Verify.h +++ b/src/libSystem/SystemKit/Verify.h @@ -7,7 +7,8 @@ ======================================== */ -#pragma once +#ifndef SYSTEMKIT_VERIFY_H +#define SYSTEMKIT_VERIFY_H #include @@ -15,14 +16,11 @@ namespace LibSystem::Verify { /// @author 0xf00sec, and Amlal El Mahrouss /// @brief safe cast operator. template -inline R sys_safe_cast(const T* ptr) { +inline R* sys_safe_cast(const T* ptr) { ::_rtl_assert(ptr, "safe cast failed!"); return static_cast(const_cast(ptr)); } -template -inline Void sys_safe_cast(const T* ptr) = delete; - template struct is_castable { using return_type = U; @@ -45,3 +43,5 @@ constexpr R* sys_constexpr_cast(T* ptr) { return static_cast(ptr); } } // namespace LibSystem::Verify + +#endif -- cgit v1.2.3