mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
refactor(Core/Misc): add braces and impove codestyle (#6402)
This commit is contained in:
@@ -28,9 +28,13 @@ class BIHWrap
|
||||
bool operator() (const G3D::Ray& ray, uint32 idx, float& maxDist, bool stopAtFirstHit)
|
||||
{
|
||||
if (idx >= objects_size)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (const T* obj = objects[idx])
|
||||
{
|
||||
return _callback(ray, *obj, maxDist, stopAtFirstHit);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -38,9 +42,13 @@ class BIHWrap
|
||||
void operator() (const G3D::Vector3& p, uint32 idx)
|
||||
{
|
||||
if (idx >= objects_size)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (const T* obj = objects[idx])
|
||||
{
|
||||
_callback(p, *obj);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +75,21 @@ public:
|
||||
uint32 Idx = 0;
|
||||
const T* temp;
|
||||
if (m_obj2Idx.getRemove(&obj, temp, Idx))
|
||||
{
|
||||
m_objects[Idx] = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_objects_to_push.remove(&obj);
|
||||
}
|
||||
}
|
||||
|
||||
void balance()
|
||||
{
|
||||
if (unbalanced_times == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unbalanced_times = 0;
|
||||
m_objects.fastClear();
|
||||
|
||||
Reference in New Issue
Block a user