Remove asserts from Microsoft Detours wrappers

Intermittently causes compile errors, the asserts should be added in the implementation file instead.
This commit is contained in:
Kawe Mazidjatari 2023-07-20 21:59:25 +02:00
parent 38785bfc9b
commit c1bdb54b6b

View File

@ -882,12 +882,9 @@ template<
LONG DetourAttach(_Inout_ T *ppPointer,
_In_ T pDetour) noexcept
{
LONG result = DetourAttach(
return DetourAttach(
reinterpret_cast<void**>(ppPointer),
reinterpret_cast<void*>(pDetour));
assert(result == NO_ERROR);
return result;
}
template<
@ -899,15 +896,12 @@ LONG DetourAttachEx(_Inout_ T *ppPointer,
_Out_opt_ T *ppRealTarget,
_Out_opt_ T *ppRealDetour) noexcept
{
LONG result = DetourAttachEx(
return DetourAttachEx(
reinterpret_cast<void**>(ppPointer),
reinterpret_cast<void*>(pDetour),
ppRealTrampoline,
reinterpret_cast<void**>(ppRealTarget),
reinterpret_cast<void**>(ppRealDetour));
assert(result == NO_ERROR);
return result;
}
template<
@ -916,12 +910,9 @@ template<
LONG DetourDetach(_Inout_ T *ppPointer,
_In_ T pDetour) noexcept
{
LONG result = DetourDetach(
return DetourDetach(
reinterpret_cast<void**>(ppPointer),
reinterpret_cast<void*>(pDetour));
assert(result == NO_ERROR);
return result;
}
#endif // __cplusplus >= 201103L || _MSVC_LANG >= 201103L