assert.h

来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 43 行

H
43
字号
//--------------------------------------------------------------------------------//// Filename   : Assert.h// Written By : Reiot////--------------------------------------------------------------------------------#ifndef __ASSERT_H__#define __ASSERT_H__// include files#include "Types.h"#include "Exception.h"//--------------------------------------------------------------------------------//// Config.h 俊 NDEBUG 啊 沥狼登搁, 葛电 Assert甫 公矫茄促.// 弊犯瘤 臼篮 版快 Assert啊 角菩窍搁 颇老俊 肺弊甫 茄饶, AssertError甫 府畔茄促.////--------------------------------------------------------------------------------void __assert__ (const char* file, uint line, const char* func, const char* expr) throw (AssertionError);//--------------------------------------------------------------------------------//// ProtocolAssert 绰 努扼捞攫飘 秦欧矫, 肋给等 单捞磐啊 逞绢棵 锭, 利例茄 措贸甫 茄 饶, // 弊 楷搬阑 辆丰矫虐绰 开且阑 茄促.////--------------------------------------------------------------------------------void __protocol_assert__ (const char* file, uint line, const char* func, const char* expr) throw (InvalidProtocolException);#if defined(NDEBUG)	#define Assert(expr) ((void)0)#elif __LINUX__	#define Assert(expr) ((void)((expr)?0:(__assert__(__FILE__,__LINE__,__PRETTY_FUNCTION__,#expr),0)))	#define ProtocolAssert(expr) ((void)((expr)?0:(__protocol_assert__(__FILE__,__LINE__,__PRETTY_FUNCTION__,#expr),0)))#elif __WIN_CONSOLE__ || __WIN32__	#define Assert(expr) ((void)((expr)?0:(__assert__(__FILE__,__LINE__,"",#expr),0)))#elif __MFC__	#define Assert(expr) ASSERT(expr)#endif#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?