mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10432] Rename ASSERT -> MANGOS_ASSERT and related fixes
ASSERT hard use in predictable way because diff. 3rd party libs code redefine it inf different ways and hard make sure that used in end of mangos define version. This is real detected problem make some expected assert checks ignored and so bugs not detected as expected from code. In addition made related changes: * Common.h header expected to be first include in any src/game/header except most simple cases. * Related FILE.h header expected to be first include in FILE.cpp * Fixed some absent includes and type forwards for safe build without PCH enabled. * Avoid using MANGOS_ASSERT in src/framework code
This commit is contained in:
parent
32e3e252fb
commit
acd0716297
77 changed files with 309 additions and 260 deletions
|
|
@ -26,6 +26,8 @@
|
|||
#include "GameSystem/GridReference.h"
|
||||
#include "Timer.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
class GridInfo
|
||||
{
|
||||
public:
|
||||
|
|
@ -96,15 +98,15 @@ class MANGOS_DLL_DECL NGrid
|
|||
|
||||
const GridType& operator()(uint32 x, uint32 y) const
|
||||
{
|
||||
ASSERT(x < N);
|
||||
ASSERT(y < N);
|
||||
assert(x < N);
|
||||
assert(y < N);
|
||||
return i_cells[x][y];
|
||||
}
|
||||
|
||||
GridType& operator()(uint32 x, uint32 y)
|
||||
{
|
||||
ASSERT(x < N);
|
||||
ASSERT(y < N);
|
||||
assert(x < N);
|
||||
assert(y < N);
|
||||
return i_cells[x][y];
|
||||
}
|
||||
|
||||
|
|
@ -185,8 +187,8 @@ class MANGOS_DLL_DECL NGrid
|
|||
|
||||
GridType& getGridType(const uint32& x, const uint32& y)
|
||||
{
|
||||
ASSERT(x < N);
|
||||
ASSERT(y < N);
|
||||
assert(x < N);
|
||||
assert(y < N);
|
||||
return i_cells[x][y];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
* types of object at the same time.
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "Platform/Define.h"
|
||||
|
|
@ -89,7 +90,7 @@ class TypeUnorderedMapContainer
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(i->second == obj && "Object with certain key already in but objects are different!");
|
||||
assert(i->second == obj && "Object with certain key already in but objects are different!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class Reference : public LinkedListElement
|
|||
// Create new link
|
||||
void link(TO* toObj, FROM* fromObj)
|
||||
{
|
||||
ASSERT(fromObj); // fromObj MUST not be NULL
|
||||
assert(fromObj); // fromObj MUST not be NULL
|
||||
if (isValid())
|
||||
unlink();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue