mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fixed stdc errors
This commit is contained in:
parent
77fffb46b2
commit
9922b5016f
@ -2688,8 +2688,6 @@ void ValidateMacros_DontCallThis_Smiley()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MEMORY_TEST
|
|
||||||
|
|
||||||
/************* MEMORY *************/
|
/************* MEMORY *************/
|
||||||
// undef all defined macros
|
// undef all defined macros
|
||||||
#undef new
|
#undef new
|
||||||
@ -2803,7 +2801,7 @@ void *operator new(size_t reportedSize)
|
|||||||
return ptr;
|
return ptr;
|
||||||
|
|
||||||
// allocation failed
|
// allocation failed
|
||||||
throw std::bad_alloc();
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *operator new[](size_t reportedSize)
|
void *operator new[](size_t reportedSize)
|
||||||
@ -2816,7 +2814,7 @@ void *operator new[](size_t reportedSize)
|
|||||||
return ptr;
|
return ptr;
|
||||||
|
|
||||||
// allocation failed
|
// allocation failed
|
||||||
throw std::bad_alloc();
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Microsoft memory tracking operators
|
// Microsoft memory tracking operators
|
||||||
@ -2830,7 +2828,7 @@ void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine)
|
|||||||
return ptr;
|
return ptr;
|
||||||
|
|
||||||
// allocation failed
|
// allocation failed
|
||||||
throw std::bad_alloc();
|
return NULL;
|
||||||
}
|
}
|
||||||
void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine)
|
void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine)
|
||||||
{
|
{
|
||||||
@ -2842,7 +2840,7 @@ void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine
|
|||||||
return ptr;
|
return ptr;
|
||||||
|
|
||||||
// allocation failed
|
// allocation failed
|
||||||
throw std::bad_alloc();
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete(void *reportedAddress)
|
void operator delete(void *reportedAddress)
|
||||||
@ -2861,8 +2859,6 @@ void operator delete[](void *reportedAddress)
|
|||||||
Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress);
|
Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //MEMORY_TEST
|
|
||||||
|
|
||||||
/************* stuff from dlls/util.cpp *************/
|
/************* stuff from dlls/util.cpp *************/
|
||||||
// must come here because cbase.h declares it's own operator new
|
// must come here because cbase.h declares it's own operator new
|
||||||
|
|
||||||
|
@ -2135,8 +2135,6 @@ void MF_Log(const char *fmt, ...);
|
|||||||
#define MF_GetPlayerEdict g_fn_GetPlayerEdict
|
#define MF_GetPlayerEdict g_fn_GetPlayerEdict
|
||||||
#define MF_Format g_fn_Format;
|
#define MF_Format g_fn_Format;
|
||||||
|
|
||||||
#ifdef MEMORY_TEST
|
|
||||||
|
|
||||||
/*** Memory ***/
|
/*** Memory ***/
|
||||||
void *operator new(size_t reportedSize);
|
void *operator new(size_t reportedSize);
|
||||||
void *operator new[](size_t reportedSize);
|
void *operator new[](size_t reportedSize);
|
||||||
@ -2180,6 +2178,4 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons
|
|||||||
#define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr)
|
#define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr)
|
||||||
#define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr)
|
#define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr)
|
||||||
|
|
||||||
#endif //MEMORY_TEST
|
|
||||||
|
|
||||||
#endif // #ifndef __AMXXMODULE_H__
|
#endif // #ifndef __AMXXMODULE_H__
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
#define MODULE_DATE "Unknown"
|
#define MODULE_DATE "Unknown"
|
||||||
#endif // __DATE__
|
#endif // __DATE__
|
||||||
|
|
||||||
// looking for mem leaks?
|
|
||||||
// #define MEMORY_TEST
|
|
||||||
|
|
||||||
// metamod plugin?
|
// metamod plugin?
|
||||||
// #define USE_METAMOD
|
// #define USE_METAMOD
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user