aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2013-08-27 19:34:03 +0100
committerNay <dnpd.dd@gmail.com>2013-08-27 19:34:03 +0100
commite5dc70118abdee9499e0620fbd8df5bd6d71b137 (patch)
treeb39863a2fed0c1fd7b4673aa6ad6ab901a5b2b84 /src
parentcc14e18664f50983e52398ec02c9f6b2b770ef85 (diff)
Server/Collision: Fix build on clang
Diffstat (limited to 'src')
-rw-r--r--src/server/collision/BoundingIntervalHierarchyWrapper.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/server/collision/BoundingIntervalHierarchyWrapper.h b/src/server/collision/BoundingIntervalHierarchyWrapper.h
index 305d57b0075..8696a759fa8 100644
--- a/src/server/collision/BoundingIntervalHierarchyWrapper.h
+++ b/src/server/collision/BoundingIntervalHierarchyWrapper.h
@@ -37,20 +37,22 @@ class BIHWrap
MDLCallback(RayCallback& callback, const T* const* objects_array, uint32 objects_size ) : objects(objects_array), _callback(callback), objects_size(objects_size) {}
- bool operator() (const G3D::Ray& ray, uint32 Idx, float& MaxDist, bool /*stopAtFirst*/)
+ /// Intersect ray
+ bool operator() (const G3D::Ray& ray, uint32 idx, float& maxDist, bool /*stopAtFirst*/)
{
- if (Idx >= objects_size)
+ if (idx >= objects_size)
return false;
- if (const T* obj = objects[Idx])
- return _callback(ray, *obj, MaxDist/*, stopAtFirst*/);
+ if (const T* obj = objects[idx])
+ return _callback(ray, *obj, maxDist/*, stopAtFirst*/);
return false;
}
- void operator() (const G3D::Vector3& p, uint32 Idx)
+ /// Intersect point
+ void operator() (const G3D::Vector3& p, uint32 idx)
{
- if (Idx >= objects_size)
- return false;
- if (const T* obj = objects[Idx])
+ if (idx >= objects_size)
+ return;
+ if (const T* obj = objects[idx])
_callback(p, *obj);
}
};