diff --git a/Source/Engine/Core/Math/BoundingSphere.cs b/Source/Engine/Core/Math/BoundingSphere.cs index b1d493528..6f1271285 100644 --- a/Source/Engine/Core/Math/BoundingSphere.cs +++ b/Source/Engine/Core/Math/BoundingSphere.cs @@ -223,13 +223,9 @@ namespace FlaxEngine { if (points == null) throw new ArgumentNullException(nameof(points)); - - // Check that start is in the correct range - if ((start < 0) || (start >= points.Length)) + if (start < 0 || start >= points.Length) throw new ArgumentOutOfRangeException(nameof(start), start, string.Format("Must be in the range [0, {0}]", points.Length - 1)); - - // Check that count is in the correct range - if ((count <= 0) || (start + count > points.Length)) + if (count <= 0 || start + count > points.Length) throw new ArgumentOutOfRangeException(nameof(count), count, string.Format("Must be in the range <= {0}", points.Length)); int upperEnd = start + count; @@ -247,15 +243,13 @@ namespace FlaxEngine for (int i = start; i < upperEnd; ++i) { // We are doing a relative distance comparison to find the maximum distance from the center of our sphere - float distance; Vector3.DistanceSquared(ref center, ref points[i], out float distance); - if (distance > radius) radius = distance; } // Find the real distance from the DistanceSquared - radius = (float)Math.Sqrt(radius); + radius = Mathf.Sqrt(radius); // Construct the sphere result.Center = center; diff --git a/Source/Engine/Debug/DebugDraw.cpp b/Source/Engine/Debug/DebugDraw.cpp index d12704a21..434b469c4 100644 --- a/Source/Engine/Debug/DebugDraw.cpp +++ b/Source/Engine/Debug/DebugDraw.cpp @@ -804,15 +804,7 @@ void DebugDraw::DrawActors(Actor** selectedActors, int32 selectedActorsCount, bo if (drawScenes) { - Function function = [](Actor* actor)-> bool - { - if (actor->IsActiveInHierarchy()) - { - actor->OnDebugDraw(); - return true; - } - return false; - }; + Function function = &DrawActorsTreeWalk; SceneQuery::TreeExecute(function); } } diff --git a/Source/Engine/GraphicsDevice/Vulkan/IncludeVulkanHeaders.h b/Source/Engine/GraphicsDevice/Vulkan/IncludeVulkanHeaders.h index 7779f790e..3e00a9e87 100644 --- a/Source/Engine/GraphicsDevice/Vulkan/IncludeVulkanHeaders.h +++ b/Source/Engine/GraphicsDevice/Vulkan/IncludeVulkanHeaders.h @@ -23,6 +23,8 @@ #define VMA_MIN(v1, v2) (Math::Min((v1), (v2))) #define VMA_MAX(v1, v2) (Math::Max((v1), (v2))) #define VMA_SWAP(v1, v2) (::Swap((v1), (v2))) +#define VMA_NULLABLE +#define VMA_NOT_NULL #include #endif