aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-12 15:16:39 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-12 15:16:39 +0100
commit0e9a4b0e9b4ba92290c106cda7164607c499940c (patch)
treed17c2c94ae99cd995b07f3de5df1385504d32113 /src
parent33454c2c8d8c0abdfd405608af4e6cd53a25e7c4 (diff)
`make format`
Diffstat (limited to 'src')
-rw-r--r--src/crepe/Exception.cpp1
-rw-r--r--src/crepe/ValueBroker.hpp3
-rw-r--r--src/crepe/api/Animator.cpp5
-rw-r--r--src/crepe/api/Camera.cpp3
-rw-r--r--src/crepe/facade/DB.cpp1
-rw-r--r--src/makefile52
6 files changed, 9 insertions, 56 deletions
diff --git a/src/crepe/Exception.cpp b/src/crepe/Exception.cpp
index a1fa765..bfdbcdd 100644
--- a/src/crepe/Exception.cpp
+++ b/src/crepe/Exception.cpp
@@ -14,4 +14,3 @@ Exception::Exception(const char * fmt, ...) {
this->error = va_stringf(args, fmt);
va_end(args);
}
-
diff --git a/src/crepe/ValueBroker.hpp b/src/crepe/ValueBroker.hpp
index 927142f..5c3bed9 100644
--- a/src/crepe/ValueBroker.hpp
+++ b/src/crepe/ValueBroker.hpp
@@ -6,7 +6,8 @@ namespace crepe {
template <typename T>
ValueBroker<T>::ValueBroker(const setter_t & setter, const getter_t & getter)
- : setter(setter), getter(getter) {}
+ : setter(setter),
+ getter(getter) {}
template <typename T>
const T & ValueBroker<T>::get() {
diff --git a/src/crepe/api/Animator.cpp b/src/crepe/api/Animator.cpp
index 8b396af..58fee2a 100644
--- a/src/crepe/api/Animator.cpp
+++ b/src/crepe/api/Animator.cpp
@@ -10,7 +10,10 @@
using namespace crepe;
Animator::Animator(uint32_t id, Sprite & ss, int row, int col, int col_animator)
- : Component(id), spritesheet(ss), row(row), col(col) {
+ : Component(id),
+ spritesheet(ss),
+ row(row),
+ col(col) {
dbg_trace();
animator_rect = spritesheet.sprite_rect;
diff --git a/src/crepe/api/Camera.cpp b/src/crepe/api/Camera.cpp
index 820a6a8..6355a03 100644
--- a/src/crepe/api/Camera.cpp
+++ b/src/crepe/api/Camera.cpp
@@ -10,7 +10,8 @@
using namespace crepe;
Camera::Camera(uint32_t id, const Color & bg_color)
- : Component(id), bg_color(bg_color) {
+ : Component(id),
+ bg_color(bg_color) {
dbg_trace();
}
diff --git a/src/crepe/facade/DB.cpp b/src/crepe/facade/DB.cpp
index 0805a08..405f7c4 100644
--- a/src/crepe/facade/DB.cpp
+++ b/src/crepe/facade/DB.cpp
@@ -63,4 +63,3 @@ bool DB::has(const std::string & key) noexcept {
}
return true;
}
-
diff --git a/src/makefile b/src/makefile
index 778e2c9..5f80204 100644
--- a/src/makefile
+++ b/src/makefile
@@ -1,56 +1,6 @@
.PHONY: FORCE
-# STEPS FOR BIG CLEANUP
-#
-# 1. Change TODO to your name (in capitals) for each file in the list below
-# that is yours (or you are going to fix)
-# 2. Update the name between parentheses below this list (see comment) to your
-# name
-# 3. Create a git commit at this point (ensure `git status` reports "working
-# tree clean")
-# 4. Run `make format` in the REPOSITORY ROOT DIRECTORY (NOT HERE), and start
-# fixing reported errors or miscorrections manually until everything works
-# again.
-# 5. Once everything is working again, create another git commit, and create a
-# pull request. Make sure to ask someone to review the code standards for
-# each ENTIRE FILE in this pull request.
-
-TODO += crepe/Collider.cpp
-TODO += crepe/Collider.h
-TODO += crepe/Particle.cpp
-TODO += crepe/Particle.h
-TODO += crepe/Position.h
-TODO += crepe/api/AssetManager.cpp
-TODO += crepe/api/AssetManager.h
-TODO += crepe/api/AssetManager.hpp
-TODO += crepe/api/CircleCollider.h
-TODO += crepe/api/Color.cpp
-TODO += crepe/api/Color.h
-TODO += crepe/api/ParticleEmitter.cpp
-TODO += crepe/api/ParticleEmitter.h
-TODO += crepe/api/Vector2.h
-TODO += crepe/api/Vector2.cpp
-TODO += crepe/api/Sprite.cpp
-TODO += crepe/api/Sprite.h
-TODO += crepe/api/Texture.cpp
-TODO += crepe/api/Texture.h
-TODO += crepe/facade/SDLContext.cpp
-TODO += crepe/facade/SDLContext.h
-TODO += crepe/system/CollisionSystem.cpp
-TODO += crepe/system/CollisionSystem.h
-TODO += crepe/system/ParticleSystem.cpp
-TODO += crepe/system/ParticleSystem.h
-TODO += crepe/system/RenderSystem.cpp
-TODO += crepe/system/RenderSystem.h
-TODO += example/asset_manager.cpp
-TODO += example/components_internal.cpp
-TODO += example/particle.cpp
-TODO += example/rendering.cpp
-
-FMT := $(LOEK) #<<< CHANGE THIS TO YOUR NAME FOR STEP 2
+FMT := $(shell git ls-files '*.c' '*.cpp' '*.h' '*.hpp')
format: FORCE
clang-tidy -p build/compile_commands.json --fix-errors $(FMT)
-# FMT += $(shell git ls-files '*.c' '*.cpp' '*.h' '*.hpp')
-# TODO: re-enable linter after all corrections
-