diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/application.cpp | 2 | ||||
| -rw-r--r-- | src/core/camera.cpp | 5 | ||||
| -rw-r--r-- | src/core/camera.h | 1 | ||||
| -rw-r--r-- | src/core/log.h | 10 | ||||
| -rw-r--r-- | src/core/window.cpp | 6 | ||||
| -rw-r--r-- | src/platform/opengl/shader.cpp | 2 | ||||
| -rw-r--r-- | src/platform/opengl/texture.cpp | 2 | ||||
| -rw-r--r-- | src/ui/ui_layer.cpp | 2 |
8 files changed, 14 insertions, 16 deletions
diff --git a/src/core/application.cpp b/src/core/application.cpp index df0f38f..81051a5 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -240,7 +240,7 @@ namespace Donut auto Application::on_event(Event& event) -> void { EventDispatcher dispatcher(event); - dispatcher.dispatch<WindowCloseEvent>([this, &event](WindowCloseEvent& e) + dispatcher.dispatch<WindowCloseEvent>([this, &event](WindowCloseEvent&) { m_running = false; event.handled = true; diff --git a/src/core/camera.cpp b/src/core/camera.cpp index 35b7a2f..589d8af 100644 --- a/src/core/camera.cpp +++ b/src/core/camera.cpp @@ -33,7 +33,6 @@ namespace Donut { float pitch = glm::radians(m_rotation.x); float yaw = glm::radians(m_rotation.y); - float roll = glm::radians(m_rotation.z); glm::vec3 direction; direction.x = cos(yaw) * cos(pitch); @@ -199,7 +198,7 @@ namespace Donut update_orbital(); } - auto Camera::process_orbital_mouse_button(int button, int action, int mods) -> void + auto Camera::process_orbital_mouse_button(int button, int action, int) -> void { if (button == GLFW_MOUSE_BUTTON_LEFT) { @@ -216,7 +215,7 @@ namespace Donut } } - auto Camera::process_orbital_scroll(double x_offset, double y_offset) -> void + auto Camera::process_orbital_scroll(double, double y_offset) -> void { m_orbital_radius -= y_offset * m_zoom_speed; m_orbital_radius = glm::clamp(m_orbital_radius, m_orbital_min_radius, m_orbital_max_radius); diff --git a/src/core/camera.h b/src/core/camera.h index c997c35..79e257c 100644 --- a/src/core/camera.h +++ b/src/core/camera.h @@ -110,7 +110,6 @@ namespace Donut float m_mouse_sensitivity = 0.1f; float m_movement_speed = 5.0f; - bool m_first_mouse = true; float m_last_x = 0.0f; float m_last_y = 0.0f; diff --git a/src/core/log.h b/src/core/log.h index db6b4b4..4237d1c 100644 --- a/src/core/log.h +++ b/src/core/log.h @@ -142,11 +142,11 @@ namespace Donut } #if defined(DONUT_DEBUG) - #define DONUT_TRACE(format, ...) ::Donut::Logger::trace(format, ##__VA_ARGS__) - #define DONUT_INFO(format, ...) ::Donut::Logger::info(format, ##__VA_ARGS__) - #define DONUT_WARN(format, ...) ::Donut::Logger::warn(format, ##__VA_ARGS__) - #define DONUT_ERROR(format, ...) ::Donut::Logger::error(format, ##__VA_ARGS__) - #define DONUT_FATAL(format, ...) ::Donut::Logger::fatal(format, ##__VA_ARGS__) + #define DONUT_TRACE(format, ...) ::Donut::Logger::trace(format __VA_OPT__(,) __VA_ARGS__) + #define DONUT_INFO(format, ...) ::Donut::Logger::info(format __VA_OPT__(,) __VA_ARGS__) + #define DONUT_WARN(format, ...) ::Donut::Logger::warn(format __VA_OPT__(,) __VA_ARGS__) + #define DONUT_ERROR(format, ...) ::Donut::Logger::error(format __VA_OPT__(,) __VA_ARGS__) + #define DONUT_FATAL(format, ...) ::Donut::Logger::fatal(format __VA_OPT__(,) __VA_ARGS__) #else #define DONUT_TRACE(format, ...) {} #define DONUT_INFO(format, ...) {} diff --git a/src/core/window.cpp b/src/core/window.cpp index 12fb46e..d3c1ff5 100644 --- a/src/core/window.cpp +++ b/src/core/window.cpp @@ -165,8 +165,8 @@ namespace Donut win->m_event_handler.on_event(event); } - auto Window::glfw_key_callback(GLFWwindow* window, int key, int scancode, - int action, int mods) -> void + auto Window::glfw_key_callback(GLFWwindow* window, int key, int, + int action, int) -> void { Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window)); @@ -198,7 +198,7 @@ namespace Donut } auto Window::glfw_mouse_button_callback(GLFWwindow* window, int button, - int action, int mods) -> void + int action, int) -> void { Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window)); diff --git a/src/platform/opengl/shader.cpp b/src/platform/opengl/shader.cpp index 34a2857..3831177 100644 --- a/src/platform/opengl/shader.cpp +++ b/src/platform/opengl/shader.cpp @@ -81,7 +81,7 @@ namespace Donut { in.seekg(0, std::ios::end); size_t size = in.tellg(); - if (size != -1) + if (size != static_cast<size_t>(-1)) { result.resize(size); in.seekg(0, std::ios::beg); diff --git a/src/platform/opengl/texture.cpp b/src/platform/opengl/texture.cpp index 07455fe..11ae1e3 100644 --- a/src/platform/opengl/texture.cpp +++ b/src/platform/opengl/texture.cpp @@ -245,7 +245,7 @@ namespace Donut glDeleteRenderbuffers(1, &capture_rbo); } - auto CubemapTexture::set_data(void* data, uint32_t size) -> void + auto CubemapTexture::set_data(void*, uint32_t) -> void { DONUT_WARN("set_data not implemented for cubemaps"); } diff --git a/src/ui/ui_layer.cpp b/src/ui/ui_layer.cpp index 811d7df..7d71ccc 100644 --- a/src/ui/ui_layer.cpp +++ b/src/ui/ui_layer.cpp @@ -99,7 +99,7 @@ namespace Donut return m_mode == Mode::Scene ? View::Scene : View::BlackHole; } - auto UILayer::draw_menu_bar(const UIContext& ctx) -> void + auto UILayer::draw_menu_bar(const UIContext&) -> void { if (!ImGui::BeginMainMenuBar()) return; |
