From e8deaa54c297931c7d5b1d292210c11e3a516ab8 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 21 Feb 2022 00:15:24 -0500 Subject: [PATCH] Cleanup debug pass warnings --- tools/common/include/debugpass.hpp | 12 +++++------- tools/common/src/debugpass.cpp | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/common/include/debugpass.hpp b/tools/common/include/debugpass.hpp index b1a1ea5..eaa4449 100755 --- a/tools/common/include/debugpass.hpp +++ b/tools/common/include/debugpass.hpp @@ -17,13 +17,11 @@ class Texture; class Mesh; -using Object = uint64_t; - struct SelectableObject { enum class Type { Object, Handle - } type; + } type = Type::Object; Matrix4x4 axis_model; @@ -31,16 +29,16 @@ struct SelectableObject { X, Y, Z - } axis; + } axis = Axis::X; enum class RenderType { Mesh, Sphere - } render_type; + } render_type = RenderType::Mesh; float sphere_size = 1.0f; - Object object; + prism::Object object = prism::NullObject; }; class DebugPass : public Pass { @@ -51,7 +49,7 @@ public: void render_scene(Scene& scene, GFXCommandBuffer* commandBuffer) override; - void get_selected_object(int x, int y, std::function callback); + void get_selected_object(int x, int y, const std::function& callback); void draw_arrow(GFXCommandBuffer* commandBuffer, prism::float3 color, Matrix4x4 model); GFXTexture* get_requested_texture(PassTextureType type) override { diff --git a/tools/common/src/debugpass.cpp b/tools/common/src/debugpass.cpp index 3786fe1..35ada4f 100755 --- a/tools/common/src/debugpass.cpp +++ b/tools/common/src/debugpass.cpp @@ -423,7 +423,7 @@ void DebugPass::render_scene(Scene& scene, GFXCommandBuffer* commandBuffer) { } } -void DebugPass::get_selected_object(int x, int y, std::function callback) { +void DebugPass::get_selected_object(int x, int y, const std::function& callback) { if(engine->get_scene() == nullptr) return;