From f5aa168f1b1a24bb7a5c73965436e1857de318ee Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 7 Dec 2019 22:15:50 +0100 Subject: [PATCH] Also set warnings to errors for Windows build, fix one of those warnings. --- CMakeLists.txt | 2 +- src/Battling/ScriptHandling/ScriptAggregator.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a716bd..4b90f08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ target_link_libraries(CreatureLibTests CreatureLibLibrary) target_link_libraries(CreatureLibTests CreatureLibBattling) if (WINDOWS) - set(CMAKE_CXX_FLAGS "-m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition") # Statically link libraries we need in Windows. target_link_libraries(CreatureLibCore -static -static-libgcc -static-libstdc++) target_link_libraries(CreatureLibLibrary -static -static-libgcc -static-libstdc++) diff --git a/src/Battling/ScriptHandling/ScriptAggregator.hpp b/src/Battling/ScriptHandling/ScriptAggregator.hpp index 43cb02e..20f06d8 100644 --- a/src/Battling/ScriptHandling/ScriptAggregator.hpp +++ b/src/Battling/ScriptHandling/ScriptAggregator.hpp @@ -11,10 +11,10 @@ namespace CreatureLib::Battling { class ScriptAggregator { std::vector _scripts; - int _index = 0; + size_t _index = 0; bool _isSetSet = false; const std::vector* _setScripts; - int _setIndex; + size_t _setIndex; public: ScriptAggregator(std::vector scripts) : _scripts(std::move(scripts)){};