GCC Code Coverage Report


Directory: ./
File: lib/ecs/src/World.cpp
Date: 2025-09-29 13:19:55
Exec Total Coverage
Lines: 11 15 73.3%
Functions: 4 5 80.0%
Branches: 1 2 50.0%

Line Branch Exec Source
1 #include "ECS/World.hpp"
2
3 namespace ECS {
4 8 EntityID World::CreateEntity() {
5 8 return m_entityManager.CreateEntity();
6 }
7
8 1 void World::DestroyEntity(EntityID entity) {
9
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 if (IsEntityAlive(entity)) {
10 1 m_componentManager.RemoveAllComponents(entity);
11 1 m_entityManager.DestroyEntity(entity);
12 }
13 1 }
14
15 3 bool World::IsEntityAlive(EntityID entity) const {
16 3 return m_entityManager.IsEntityAlive(entity);
17 }
18
19 void World::Clear() {
20 m_componentManager.Clear();
21 m_entityManager.Clear();
22 }
23
24 1 size_t World::GetAliveEntityCount() const {
25 1 return m_entityManager.GetAliveEntityCount();
26 }
27 }
28