diff --git a/CMakeLists.txt b/CMakeLists.txt index 76a71ff..9533397 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(skeldal) find_package(SDL2 REQUIRED) if (MSVC) - add_compile_options(/W4 /EHa /DNOMINMAX /J) + add_compile_options(/W4 /EHa /DNOMINMAX /D_CRT_SECURE_NO_WARNINGS /J) set(STANDARD_LIBRARIES "") else() add_compile_options(-Wall -Wextra -Werror -Wno-unused-result -Wno-unused-parameter -Wno-unused-value -Wno-extern-c-compat -funsigned-char) diff --git a/tools/ddl_ar.cpp b/tools/ddl_ar.cpp index 4c23d3d..fcafa54 100644 --- a/tools/ddl_ar.cpp +++ b/tools/ddl_ar.cpp @@ -49,10 +49,10 @@ void new_ddl(std::string ddl_file, std::string path) { while (iter != end) { const auto &entry = *iter; if (entry.is_regular_file()) { - uint32_t sz = entry.file_size(); + uint32_t sz = static_cast(entry.file_size()); std::string fname = entry.path().filename().string(); if (fname.size() <= 12) { - std::transform(fname.begin(), fname.end(), fname.begin(),[](char c)->char{return std::toupper(c);}); + std::transform(fname.begin(), fname.end(), fname.begin(),[](char c)->char{return static_cast(std::toupper(c));}); dir.push_back(DirEntry{entry.path(), fname, sz,0}); } } @@ -67,7 +67,7 @@ void new_ddl(std::string ddl_file, std::string path) { std::size_t dataofs = 8 + dir.size()*(12+4); for (auto &x: dir) { - x.offset = dataofs; + x.offset = static_cast(dataofs); dataofs+=4+x.size; }