Updated comment for G_Assert

This commit is contained in:
Walter Julius Hennecke 2013-12-20 22:02:50 +01:00
parent ed7c48b8d6
commit 133398e130

View file

@ -2907,11 +2907,10 @@ typedef struct {
} target_alert_Shaders_s;
/*
* @brief Checks if a pointer is NULL and returns result.
* If the pointer is NULL a message get's logged as error
* and the function returns qtrue else the function returns
* qfalse.
* @brief Checks if a pointer is NULL. If it is NULL it exits the function with the given return value.
* Prints an error message if ptr is NULL and prints function exit message on LL_TRACE. For void return use "(void)0"
* @param ptr The pointer to check.
* @param ret The return value.
* @return Whether the pointer is NULL or not.
*/
#define G_Assert(ptr, ret) if (ptr == NULL) { _G_LocLogger(__FILE__, __LINE__, LL_ERROR, "%s == NULL!\n", #ptr); _G_LocLogger(__FILE__, __LINE__, LL_TRACE, "%s - End\n", __FUNCTION__); return ret; }