aboutsummaryrefslogtreecommitdiff
path: root/mwe/ecs-memory-efficient
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-11-13 19:05:25 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-11-13 19:05:25 +0100
commit0b2ca3c323c7f73d031e7014ba0a17dcf0b59751 (patch)
tree8a3ebeee7e2aab9ba064c62fce0cd33def6f2d18 /mwe/ecs-memory-efficient
parent1d4b3a44c9ce1e69f4f0e3909998225f8af3fea2 (diff)
parentf2509e89c02894ebd3ad992324eb300103621d26 (diff)
merge with master
Diffstat (limited to 'mwe/ecs-memory-efficient')
-rw-r--r--mwe/ecs-memory-efficient/inc/ContiguousContainer.hpp3
-rw-r--r--mwe/ecs-memory-efficient/src/Components.cpp4
-rw-r--r--mwe/ecs-memory-efficient/src/GameObjectMax.cpp6
3 files changed, 10 insertions, 3 deletions
diff --git a/mwe/ecs-memory-efficient/inc/ContiguousContainer.hpp b/mwe/ecs-memory-efficient/inc/ContiguousContainer.hpp
index 408d5aa..ff8fde4 100644
--- a/mwe/ecs-memory-efficient/inc/ContiguousContainer.hpp
+++ b/mwe/ecs-memory-efficient/inc/ContiguousContainer.hpp
@@ -1,5 +1,6 @@
template <typename T>
-ContiguousContainer<T>::ContiguousContainer() : mSize(0), mCapacity(10) {
+ContiguousContainer<T>::ContiguousContainer() : mSize(0),
+ mCapacity(10) {
// Allocate memory for 10 objects initially
mData = static_cast<T *>(malloc(mCapacity * sizeof(T)));
if (!mData) {
diff --git a/mwe/ecs-memory-efficient/src/Components.cpp b/mwe/ecs-memory-efficient/src/Components.cpp
index c8347b3..2ec8609 100644
--- a/mwe/ecs-memory-efficient/src/Components.cpp
+++ b/mwe/ecs-memory-efficient/src/Components.cpp
@@ -6,6 +6,8 @@ Component::Component() : mActive(true) {}
Sprite::Sprite(std::string path) : mPath(path) {}
Rigidbody::Rigidbody(int mass, int gravityScale, int bodyType)
- : mMass(mass), mGravityScale(gravityScale), mBodyType(bodyType) {}
+ : mMass(mass),
+ mGravityScale(gravityScale),
+ mBodyType(bodyType) {}
Colider::Colider(int size) : mSize(size) {}
diff --git a/mwe/ecs-memory-efficient/src/GameObjectMax.cpp b/mwe/ecs-memory-efficient/src/GameObjectMax.cpp
index b0c5af7..753c8e2 100644
--- a/mwe/ecs-memory-efficient/src/GameObjectMax.cpp
+++ b/mwe/ecs-memory-efficient/src/GameObjectMax.cpp
@@ -4,4 +4,8 @@
GameObject::GameObject(std::uint32_t id, std::string name, std::string tag,
int layer)
- : mId(id), mName(name), mTag(tag), mActive(true), mLayer(layer) {}
+ : mId(id),
+ mName(name),
+ mTag(tag),
+ mActive(true),
+ mLayer(layer) {}