mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-22 08:50:48 +00:00
Some minor changes to G_Assert.
This commit is contained in:
parent
d1edc454ee
commit
2460b1c959
2 changed files with 5 additions and 5 deletions
|
@ -1,10 +1,10 @@
|
|||
#include "g_local.h"
|
||||
#include "g_logger.h"
|
||||
|
||||
qboolean _G_Assert(void* ptr, const char* varname, const char* function) {
|
||||
qboolean _G_Assert(void* ptr, const char* varname, const char* function, const char* file, int line) {
|
||||
if (ptr == NULL) {
|
||||
G_LocLogger(LL_ERROR, "%s == NULL!\n", varname);
|
||||
G_LocLogger(LL_TRACE, "%s - End\n", function);
|
||||
_G_LocLogger(file, line, LL_ERROR, "%s == NULL!\n", varname);
|
||||
_G_LocLogger(file, line, LL_TRACE, "%s - End\n", function);
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
|
|
@ -2914,7 +2914,7 @@ typedef struct {
|
|||
* @param ptr The pointer to check.
|
||||
* @return Whether the pointer is NULL or not.
|
||||
*/
|
||||
qboolean _G_Assert(void* ptr, const char* varname, const char* function);
|
||||
#define G_Assert(ptr) _G_Assert(ptr, #ptr, __FUNCTION__)
|
||||
qboolean _G_Assert(void* ptr, const char* varname, const char* function, const char* file, int line);
|
||||
#define G_Assert(ptr) _G_Assert(ptr, #ptr, __FUNCTION__, __FILE__, __LINE__)
|
||||
|
||||
#endif //_G_LOCAL_H_
|
||||
|
|
Loading…
Reference in a new issue