aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/application.cpp2
-rw-r--r--src/core/camera.cpp5
-rw-r--r--src/core/camera.h1
-rw-r--r--src/core/log.h10
-rw-r--r--src/core/window.cpp6
-rw-r--r--src/platform/opengl/shader.cpp2
-rw-r--r--src/platform/opengl/texture.cpp2
-rw-r--r--src/ui/ui_layer.cpp2
8 files changed, 14 insertions, 16 deletions
diff --git a/src/core/application.cpp b/src/core/application.cpp
index 5a3a21b..433f0e7 100644
--- a/src/core/application.cpp
+++ b/src/core/application.cpp
@@ -250,7 +250,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& /*e*/)
{
m_running = false;
event.handled = true;
diff --git a/src/core/camera.cpp b/src/core/camera.cpp
index 35b7a2f..ab12782 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 /*mods*/) -> 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 /*x_offset*/, 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 085d7bc..9a8d1ec 100644
--- a/src/core/window.cpp
+++ b/src/core/window.cpp
@@ -170,8 +170,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 /*scancode*/,
+ int action, int /*mods*/) -> void
{
Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window));
@@ -203,7 +203,7 @@ namespace Donut
}
auto Window::glfw_mouse_button_callback(GLFWwindow* window, int button,
- int action, int mods) -> void
+ int action, int /*mods*/) -> void
{
Window* win = static_cast<Window*>(glfwGetWindowUserPointer(window));
diff --git a/src/platform/opengl/shader.cpp b/src/platform/opengl/shader.cpp
index 757382b..a56a1b7 100644
--- a/src/platform/opengl/shader.cpp
+++ b/src/platform/opengl/shader.cpp
@@ -85,7 +85,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 d2d2233..5036ca6 100644
--- a/src/platform/opengl/texture.cpp
+++ b/src/platform/opengl/texture.cpp
@@ -255,7 +255,7 @@ namespace Donut
glDeleteRenderbuffers(1, &capture_rbo);
}
- auto CubemapTexture::set_data(void* data, uint32_t size) -> void
+ auto CubemapTexture::set_data(void* /*data*/, uint32_t /*size*/) -> void
{
DONUT_WARN("set_data not implemented for cubemaps");
}
diff --git a/src/ui/ui_layer.cpp b/src/ui/ui_layer.cpp
index dc61d2d..1c014e6 100644
--- a/src/ui/ui_layer.cpp
+++ b/src/ui/ui_layer.cpp
@@ -107,7 +107,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& /*ctx*/) -> void
{
if (!ImGui::BeginMainMenuBar()) return;