common.cc

来自「本人收集整理的一份c/c++跨平台网络库」· CC 代码 · 共 36 行

CC
36
字号
#include <stdlib.h>#include <stdio.h>#include <memory.h>#ifdef WIN32#include <windows.h>#endif  // WIN32#include <algorithm>#include "common.h"//////////////////////////////////////////////////////////////////////// Assertions//////////////////////////////////////////////////////////////////////namespace utils_base {void Break() {#ifdef WIN32  ::DebugBreak();#else // !WIN32#if _DEBUG_HAVE_BACKTRACE  OutputTrace();#endif  abort();#endif // !WIN32}void LogAssert(const char * function, const char * file, int line, const char * expression) {  // TODO - if we put hooks in here, we can do a lot fancier logging  fprintf(stderr, "%s(%d): %s @ %s\n", file, line, expression, function);}} // namespace utils_base

⌨️ 快捷键说明

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