CodexAssert.cpp 689 B

12345678910111213141516171819202122
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #include "stdafx.h"
  6. // The Codex library requires this assertion.
  7. void CodexAssert(bool condition)
  8. {
  9. condition;
  10. Assert(condition);
  11. }
  12. void CodexAssertOrFailFast(bool condition)
  13. {
  14. Assert(condition);
  15. if (!condition)
  16. {
  17. TerminateProcess(GetCurrentProcess(), (UINT)DBG_TERMINATE_PROCESS);
  18. }
  19. }