aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-24 19:07:35 +0200
committerhachem <im@hachem.wtf>2026-08-24 19:07:35 +0200
commit0158611e08cebd24518b1439904905d5dacbdf35 (patch)
treee2f16d43952fed5c30532c1f4f1fb04d4ca581d2 /src/core
parenta34c49f103c8950a57687ea3d866c244d95b4414 (diff)
[chore]: -Wall -Wextra -Werror -pedantic
Diffstat (limited to 'src/core')
-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
5 files changed, 11 insertions, 13 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));