Assert.cpp 466 B

123456789101112131415161718
  1. #include "os/Assert.h"
  2. #if IL2CPP_DEBUG
  3. #if IL2CPP_TARGET_WINDOWS || IL2CPP_TARGET_XBOXONE || IL2CPP_TARGET_WINRT || IL2CPP_TARGET_WINDOWS_GAMES
  4. #include <crtdbg.h>
  5. void il2cpp_assert(const char* assertion, const char* file, unsigned int line)
  6. {
  7. if (_CrtDbgReport(_CRT_ASSERT, file, line, "", "%s", assertion) == 1)
  8. {
  9. _CrtDbgBreak();
  10. }
  11. }
  12. #endif // IL2CPP_TARGET_WINDOWS || IL2CPP_TARGET_XBOXONE || IL2CPP_TARGET_WINRT
  13. #endif // IL2CPP_DEBUG