Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions include/Kappa/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions src/Application.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "Kappa/Application.h"

#include <cassert>
#include <stdexcept>

#include <GLFW/glfw3.h>
#include <glm/gtc/constants.hpp>
Expand All @@ -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);
Expand Down
Loading