mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 08:59:11 +01:00
Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port
This commit is contained in:
@@ -40,20 +40,20 @@ int CHECK_TREE_PERIOD = 200;
|
||||
} // namespace
|
||||
|
||||
template<> struct HashTrait< GameObjectModel>{
|
||||
static size_t hashCode(const GameObjectModel& g) { return (size_t)(void*)&g; }
|
||||
static size_t hashCode(GameObjectModel const& g) { return (size_t)(void*)&g; }
|
||||
};
|
||||
|
||||
template<> struct PositionTrait< GameObjectModel> {
|
||||
static void getPosition(const GameObjectModel& g, G3D::Vector3& p) { p = g.getPosition(); }
|
||||
static void getPosition(GameObjectModel const& g, G3D::Vector3& p) { p = g.getPosition(); }
|
||||
};
|
||||
|
||||
template<> struct BoundsTrait< GameObjectModel> {
|
||||
static void getBounds(const GameObjectModel& g, G3D::AABox& out) { out = g.getBounds();}
|
||||
static void getBounds2(const GameObjectModel* g, G3D::AABox& out) { out = g->getBounds();}
|
||||
static void getBounds(GameObjectModel const& g, G3D::AABox& out) { out = g.getBounds();}
|
||||
static void getBounds2(GameObjectModel const* g, G3D::AABox& out) { out = g->getBounds();}
|
||||
};
|
||||
|
||||
/*
|
||||
static bool operator == (const GameObjectModel& mdl, const GameObjectModel& mdl2){
|
||||
static bool operator==(GameObjectModel const& mdl, GameObjectModel const& mdl2){
|
||||
return &mdl == &mdl2;
|
||||
}
|
||||
*/
|
||||
@@ -71,13 +71,13 @@ struct DynTreeImpl : public ParentTree/*, public Intersectable*/
|
||||
{
|
||||
}
|
||||
|
||||
void insert(const Model& mdl)
|
||||
void insert(Model const& mdl)
|
||||
{
|
||||
base::insert(mdl);
|
||||
++unbalanced_times;
|
||||
}
|
||||
|
||||
void remove(const Model& mdl)
|
||||
void remove(Model const& mdl)
|
||||
{
|
||||
base::remove(mdl);
|
||||
++unbalanced_times;
|
||||
@@ -114,17 +114,17 @@ DynamicMapTree::~DynamicMapTree()
|
||||
delete impl;
|
||||
}
|
||||
|
||||
void DynamicMapTree::insert(const GameObjectModel& mdl)
|
||||
void DynamicMapTree::insert(GameObjectModel const& mdl)
|
||||
{
|
||||
impl->insert(mdl);
|
||||
}
|
||||
|
||||
void DynamicMapTree::remove(const GameObjectModel& mdl)
|
||||
void DynamicMapTree::remove(GameObjectModel const& mdl)
|
||||
{
|
||||
impl->remove(mdl);
|
||||
}
|
||||
|
||||
bool DynamicMapTree::contains(const GameObjectModel& mdl) const
|
||||
bool DynamicMapTree::contains(GameObjectModel const& mdl) const
|
||||
{
|
||||
return impl->contains(mdl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user