]> git.seodisparate.com/gitweb - EntityComponentMetaSystem/commitdiff
Replace variable length arrays with std::vector
authorStephen Seo <seo.disparate@gmail.com>
Fri, 6 Oct 2017 03:58:49 +0000 (12:58 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 6 Oct 2017 03:58:49 +0000 (12:58 +0900)
src/CMakeLists.txt
src/EC/Manager.hpp

index 553670da6d11a58396656d4c1e950e565e488542..62c605653a8a164c1a8373a3e03b081b1e619cbb 100644 (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")
 
index b1c4a698d13e932dc7385cb67e457cfecb7830b4..2adf0d2c9b8a998459e563f8b1cf973ae2205aef 100644 (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)
                     {