mirror of https://gitee.com/bigwinds/arangodb
cleanup
This commit is contained in:
parent
e4c27b0f44
commit
b4cdafaef9
|
@ -179,17 +179,11 @@ typedef long suseconds_t;
|
|||
#undef free
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief helper macro for calculating strlens for static strings at
|
||||
/// a compile-time (unless compiled with fno-builtin-strlen etc.)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define TRI_CHAR_LENGTH_PAIR(value) (value), strlen(value)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief assert
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TRI_ASSERT
|
||||
|
||||
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||
|
@ -211,12 +205,8 @@ typedef long suseconds_t;
|
|||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief aborts program execution, returning an error code
|
||||
///
|
||||
/// if backtraces are enabled, a backtrace will be printed before
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define FATAL_ERROR_EXIT(...) \
|
||||
do { \
|
||||
TRI_LogBacktrace(); \
|
||||
|
@ -226,12 +216,8 @@ typedef long suseconds_t;
|
|||
exit(EXIT_FAILURE); \
|
||||
} while (0)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief aborts program execution, calling std::abort
|
||||
///
|
||||
/// if backtraces are enabled, a backtrace will be printed before
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define FATAL_ERROR_ABORT(...) \
|
||||
do { \
|
||||
TRI_LogBacktrace(); \
|
||||
|
@ -251,7 +237,6 @@ inline void ADB_WindowsExitFunction(int exitCode, void* data) {}
|
|||
// --SECTIONS-- deferred execution
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Use in a function (or scope) as:
|
||||
/// TRI_DEFER( <ONE_STATEMENT> );
|
||||
/// and the statement will be called regardless if the function throws or
|
||||
|
@ -262,8 +247,6 @@ inline void ADB_WindowsExitFunction(int exitCode, void* data) {}
|
|||
/// appearance.
|
||||
/// The idea to this is from
|
||||
/// http://blog.memsql.com/c-error-handling-with-auto/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define TOKEN_PASTE_WRAPPED(x, y) x##y
|
||||
#define TOKEN_PASTE(x, y) TOKEN_PASTE_WRAPPED(x, y)
|
||||
|
||||
|
|
Loading…
Reference in New Issue