现在的位置: 首页 > 综合 > 正文

自用调试宏

2018年01月16日 ⁄ 综合 ⁄ 共 394字 ⁄ 字号 评论关闭

#define PF_ASSERT Q_ASSERT

//调试宏
#define PRINTINFO PrintMacInfo(__FUNCTION__, __FILE__, __LINE__);

#ifdef REALSHARK_DEBUG
#define DEBUGPRINT(x) std::cout<<x<<std::endl;PRINTINFO;
#else
#define DEBUGPRINT(x)
#endif

inline void PrintMacInfo(char* szFunc, char* szFile, int nLine)
{
std::cout << "---------- print info " << __DATE__ << " " << __TIME__ << "------------" << std::endl;
std::cout << szFile << "\t" << nLine << "\t" << szFunc << std::endl;
}

抱歉!评论已关闭.