From: Stephen Seo Date: Fri, 6 Oct 2017 03:58:49 +0000 (+0900) Subject: Replace variable length arrays with std::vector X-Git-Tag: 1.0~69 X-Git-Url: https://git.seodisparate.com/stephenseo/static/search/searchdata.js?a=commitdiff_plain;h=ab580a556544dc2f175fba7a28a69fc7e8647fca;p=EntityComponentMetaSystem Replace variable length arrays with std::vector --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 553670d..62c6056 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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") diff --git a/src/EC/Manager.hpp b/src/EC/Manager.hpp index b1c4a69..2adf0d2 100644 --- a/src/EC/Manager.hpp +++ b/src/EC/Manager.hpp @@ -553,7 +553,7 @@ namespace EC } else { - std::thread threads[threadCount]; + std::vector 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 threads(threadCount); std::size_t s = this->currentSize / threadCount; for(std::size_t i = 0; i < threadCount; ++ i) {