AssertHook.cpp (1218B)
1 /*---------------------------------------------------------------------------------------- 2 3 Copyright (c) 2023 AUDIOKINETIC Inc. 4 5 This file is licensed to use under the license available at: 6 https://github.com/audiokinetic/ReaWwise/blob/main/License.txt (the "License"). 7 You may not use this file except in compliance with the License. 8 9 Unless required by applicable law or agreed to in writing, software distributed 10 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 specific language governing permissions and limitations under the License. 13 14 ----------------------------------------------------------------------------------------*/ 15 16 #include <AK/Tools/Common/AkAssert.h> 17 #include <cassert> 18 #include <stdio.h> 19 20 #ifdef AK_ENABLE_ASSERTS 21 22 namespace AK::WwiseTransfer 23 { 24 void AssertHook(const char* in_pszExpression, const char* in_pszFileName, int in_lineNumber) 25 { 26 char buff[1024]; 27 snprintf(buff, sizeof(buff), "AKASSERT: %s, %s - %d", in_pszExpression, in_pszFileName, in_lineNumber); 28 assert(0 && buff); 29 } 30 } // namespace AK::WwiseTransfer 31 32 AkAssertHook g_pAssertHook = AK::WwiseTransfer::AssertHook; 33 34 #endif