⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 assert.h

📁 小型的3D游戏引擎
💻 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 + -