📄 assert.h
字号:
/********************************************************************
created: ?
author: Steve Rabin, Game Programming Gems
copyright: Copyright 2003 (C) Steve Rabin
description: Assert function
*********************************************************************/
#ifndef _ASSERT_H_
#define _ASSERT_H_
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
#ifdef _DEBUG
extern bool _DebugAssert( int expression, char * description, int line, char * file, bool & ignoreAlways );
#define assertex( exp ) \
{ static bool ignoreAlways = false; \
if( !ignoreAlways ) \
{ \
if( _DebugAssert( (int)(exp), #exp, __LINE__, __FILE__, ignoreAlways ) ) \
{ _asm { int 3 } } \
} \
}
#else
#define assertex( exp )
#endif
#endif /* _ASSERT_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -