From c6b1df93ca83ef3a55143faf76fb6774b928f3a1 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Sun, 17 Mar 2019 08:28:14 +0700 Subject: [PATCH] fix few warnings --- CMakeLists.txt | 9 +++++++++ .../systems/render_system_impl/render_system_batcher.hpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22af503e..fe1c7737 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,15 @@ if(E2D_BUILD_WITH_SANITIZER AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} ${E2D_SANITIZER_FLAGS}") endif() +# +# global compiling mode +# + +if(MSVC) + add_definitions(/MP) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif(MSVC) + # # e2d sources # diff --git a/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp b/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp index 89c4d1c7..d85d0978 100644 --- a/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp +++ b/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp @@ -124,7 +124,7 @@ namespace e2d { namespace render_system_impl std::transform( iter, indices_.end(), iter, [add = vertices_.size()](index_type v) noexcept { - return v + add; + return static_cast(v + add); }); batches_.back().count += index_count; }