mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core: ported headers cleanup from master branch
This commit is contained in:
@@ -41,20 +41,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;
|
||||
}
|
||||
*/
|
||||
@@ -72,13 +72,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;
|
||||
@@ -115,17 +115,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);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ struct DynamicTreeIntersectionCallback
|
||||
bool did_hit;
|
||||
uint32 phase_mask;
|
||||
DynamicTreeIntersectionCallback(uint32 phasemask) : did_hit(false), phase_mask(phasemask) { }
|
||||
bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
|
||||
bool operator()(G3D::Ray const& r, GameObjectModel const& obj, float& distance)
|
||||
{
|
||||
did_hit = obj.intersectRay(r, distance, true, phase_mask, VMAP::ModelIgnoreFlags::Nothing);
|
||||
return did_hit;
|
||||
@@ -161,7 +161,7 @@ struct DynamicTreeIntersectionCallback_WithLogger
|
||||
{
|
||||
TC_LOG_DEBUG("maps", "Dynamic Intersection log");
|
||||
}
|
||||
bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
|
||||
bool operator()(G3D::Ray const& r, GameObjectModel const& obj, float& distance)
|
||||
{
|
||||
TC_LOG_DEBUG("maps", "testing intersection with %s", obj.name.c_str());
|
||||
bool hit = obj.intersectRay(r, distance, true, phase_mask, VMAP::ModelIgnoreFlags::Nothing);
|
||||
|
||||
Reference in New Issue
Block a user