see #3
This commit is contained in:
@@ -47,7 +47,7 @@ message("*")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wconversion")
|
||||
# set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wextra -Weffc++")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -DDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DRELEASE")
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
reverse.resize(entity+1);
|
||||
}
|
||||
|
||||
reverse[entity] = direct.size();
|
||||
reverse[entity] = pos_type(direct.size());
|
||||
direct.emplace_back(entity);
|
||||
data.push_back({ args... });
|
||||
|
||||
@@ -124,7 +124,11 @@ public:
|
||||
using size_type = typename Pool<Component>::size_type;
|
||||
|
||||
explicit ComponentPool(size_type dim = 4098) noexcept
|
||||
#ifdef _MSC_VER
|
||||
: ComponentPool<Entity, Component>{dim}, ComponentPool<Entity, Components>{dim}...
|
||||
#else
|
||||
: Pool<Component>{dim}, Pool<Components>{dim}...
|
||||
#endif
|
||||
{
|
||||
assert(!(dim < 0));
|
||||
}
|
||||
|
||||
@@ -243,11 +243,11 @@ public:
|
||||
Registry & operator=(Registry &&) = delete;
|
||||
|
||||
size_type size() const noexcept {
|
||||
return static_cast<size_type>(count - available.size());
|
||||
return count - available.size();
|
||||
}
|
||||
|
||||
size_type capacity() const noexcept {
|
||||
return static_cast<size_type>(count);
|
||||
return count;
|
||||
}
|
||||
|
||||
template<typename Comp>
|
||||
|
||||
Reference in New Issue
Block a user