Replace variable length arrays with std::vector

This commit is contained in:
Stephen Seo 2017-10-06 12:58:49 +09:00
parent a08b1575d6
commit ab580a5565
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ target_include_directories(EntityComponentSystem INTERFACE ${CMAKE_CURRENT_SOURC
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -D NDEBUG")

View file

@ -553,7 +553,7 @@ namespace EC
}
else
{
std::thread threads[threadCount];
std::vector<std::thread> threads(threadCount);
std::size_t s = currentSize / threadCount;
for(std::size_t i = 0; i < threadCount; ++i)
{
@ -682,7 +682,7 @@ namespace EC
}
else
{
std::thread threads[threadCount];
std::vector<std::thread> threads(threadCount);
std::size_t s = this->currentSize / threadCount;
for(std::size_t i = 0; i < threadCount; ++ i)
{