Skip to content

Commit

Permalink
CI build test
Browse files Browse the repository at this point in the history
  • Loading branch information
jadebenn committed Jan 22, 2024
1 parent b802c13 commit 5fb6f75
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ set(RECASTNAVIGATION_EXAMPLES OFF CACHE BOOL "" FORCE)
# Disabled no-register
# Disabled unknown pragmas because Linux doesn't understand Windows pragmas.
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wuninitialized -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wuninitialized -fPIC -fdata-sections -ffunction-sections -Wl,--gc-sections")
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0 _GLIBCXX_USE_CXX17_ABI=0)

if(NOT APPLE)
Expand Down
9 changes: 9 additions & 0 deletions dGame/dEntity/EntitySystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ class EntitySystem final {
>; // TODO: Figure out how to generate this automatically
using ComponentTypeId = std::type_index;

struct ArchetypeVariants final {
std::vector<ArchetypeVariantPtr> data;

template <typename T>
std::vector<T>& begin() { return &data[0]; }

};

/**
* Adds entity to the entity system
* @param explicitId Explicit object ID to provide to entity
Expand Down Expand Up @@ -163,6 +171,7 @@ class EntitySystem final {
public:
//private:
std::vector<ArchetypeVariantPtr> m_Archetypes;
//ArchetypeVariants m_Archetypes;

struct ArchetypeRecord {
size_t archetypeIndex;
Expand Down
1 change: 1 addition & 0 deletions tests/dGameTests/dEntitiesTests/ArchetypeTests.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "GameDependencies.h"
#include <gtest/gtest.h>

#include <algorithm>
#include <typeindex>
#include <unordered_set>

Expand Down

0 comments on commit 5fb6f75

Please sign in to comment.