diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..75f3583 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# Normalize line endings +* text=auto +*.cpp text eol=lf +*.hpp text eol=lf +*.h text eol=lf +*.cmake text eol=lf +*.py text eol=lf +*.yaml text eol=lf +*.yml text eol=lf +*.json text eol=lf +*.md text eol=lf diff --git a/CHANGELOG.md b/CHANGELOG.md index 15c48b1..525ec4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ 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). +## [Unreleased] + +### Added + +- Support for line ending normalization + +### Changed + +- Application singleton now uses protected constructor and logic_error check + ## [0.6.0] - 2026-02-15 - Change headers parent folder to Kappa @@ -143,6 +153,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - CMake build system - Example application demonstrating framework usage +[Unreleased]: https://github.com/Konstantysz/kappa-core/compare/v0.6.0...HEAD [0.6.0]: https://github.com/Konstantysz/kappa-core/compare/v0.5.3...v0.6.0 [0.5.3]: https://github.com/Konstantysz/kappa-core/compare/v0.5.2...v0.5.3 [0.5.2]: https://github.com/Konstantysz/kappa-core/compare/v0.5.1...v0.5.2 diff --git a/include/Kappa/Application.h b/include/Kappa/Application.h index b3d4145..736d360 100644 --- a/include/Kappa/Application.h +++ b/include/Kappa/Application.h @@ -26,12 +26,6 @@ namespace Kappa class Application { public: - /** - * @brief Constructs an application. - * @param specification Application configuration - */ - explicit Application(const ApplicationSpecification &specification = ApplicationSpecification()); - /** * @brief Virtual destructor for proper cleanup of derived classes. */ @@ -48,6 +42,12 @@ namespace Kappa void Stop(); protected: + /** + * @brief Constructs an application. + * @param specification Application configuration + */ + explicit Application(const ApplicationSpecification &specification = ApplicationSpecification()); + /** * @brief Adds a layer to the layer stack (default constructible version). * @tparam TLayer Layer type (must derive from Layer) diff --git a/src/Application.cpp b/src/Application.cpp index 13ace77..2037cce 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -1,6 +1,7 @@ #include "Kappa/Application.h" #include +#include #include #include @@ -18,6 +19,11 @@ namespace Kappa Application::Application(const ApplicationSpecification &spec) : specification(spec) { + if (instance) + { + throw std::logic_error("Application already exists!"); + } + instance = this; glfwSetErrorCallback(GLFWErrorCallback);