diff --git a/CHANGELOG.md b/CHANGELOG.md index 36157e6..568db15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.1] - 2025-11-22 + +### Fixed + +- Compilation warnings for unused parameters in `Layer` class +- `nodiscard` warning in `TestApplication` tests +- Enabled stricter warning flags (`/W4` for MSVC, `-Wall -Wextra -Wpedantic -Werror` for others) in CMake build system + ## [0.5.0] - 2025-11-15 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 7202acb..0269603 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,12 @@ target_link_libraries(Kappa PUBLIC target_compile_features(Kappa PUBLIC cxx_std_20) +if(MSVC) + target_compile_options(Kappa PRIVATE /W4) +else() + target_compile_options(Kappa PRIVATE -Wall -Wextra -Wpedantic -Werror) +endif() + # Setup code quality targets and IDE integration kappa_add_code_quality_targets() kappa_setup_ide_integration() diff --git a/include/Layer.h b/include/Layer.h index d110a0e..39589f0 100644 --- a/include/Layer.h +++ b/include/Layer.h @@ -19,7 +19,7 @@ namespace Kappa * @brief Called when an event occurs. * @param event Event to handle */ - virtual void OnEvent(Event &event) + virtual void OnEvent([[maybe_unused]] Event &event) { } @@ -27,7 +27,7 @@ namespace Kappa * @brief Called every frame to update the layer. * @param deltaTime Time elapsed since last update */ - virtual void OnUpdate(float deltaTime) + virtual void OnUpdate([[maybe_unused]] float deltaTime) { } diff --git a/tests/TestApplication.cpp b/tests/TestApplication.cpp index b4e2afc..a000d2a 100644 --- a/tests/TestApplication.cpp +++ b/tests/TestApplication.cpp @@ -233,7 +233,7 @@ TEST_F(ApplicationTest, ApplicationHasEventBus) { TestApplication app(spec); - EXPECT_NO_THROW(app.GetEventBus()); + EXPECT_NO_THROW(static_cast(app.GetEventBus())); } // ============================================================================