fix few warnings

This commit is contained in:
2019-03-17 08:28:14 +07:00
parent d1bfd8f6a7
commit c6b1df93ca
2 changed files with 10 additions and 1 deletions

View File

@@ -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
#

View File

@@ -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<index_type>(v + add);
});
batches_.back().count += index_count;
}