summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-20 22:19:19 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-20 22:19:19 +0200
commitaf931eef1537cd4206eefcb981be75a2d01cba17 (patch)
tree9b3d7b869a2a6ee82dbfbb750786d42a79b4263e
parent767668381e1b2f76e5035e69a3d7d6f318fe2f67 (diff)
fix some warnings
-rw-r--r--CMakeLists.txt11
-rw-r--r--external/CMakeLists.txt11
-rw-r--r--main/editor.hpp2
3 files changed, 16 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6ed73a2d..7447b2a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,19 +68,18 @@ function(fm_load_userconfig)
endfunction()
if(WIN32)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -DWIN32_LEAN_AND_MEAN)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0)
endif()
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES=1)
add_compile_options(-permissive-)
+ add_compile_options(-external:W0 -external:anglebrackets)
add_compile_options(
- -wd4244 # warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data
- -wd4312 # warning C4312: 'reinterpret_cast': conversion from 'GLenum' to 'void *' of greater size
- -wd4251 # warning C4251: 't::f': class 'x' needs to have dll-interface to be used by clients of class 'y'
- -wd4456 # warning C4456: declaration of 'x' hides previous local declaration
+ #-wd4244 # warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data
+ #-wd4251 # warning C4251: 't::f': class 'x' needs to have dll-interface to be used by clients of class 'y'
+ -wd4456 # warning C4456: declaration of 'x' hides previous local declaration
)
- add_compile_options(-external:W0 -external:anglebrackets)
if(CMAKE_SIZEOF_VOID_P GREATER_EQUAL 8)
add_link_options(-HIGHENTROPYVA)
endif()
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 3b4110b7..6cf2ad2d 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -12,6 +12,15 @@ if(MSVC)
set_property(DIRECTORY APPEND PROPERTY STATIC_LIBRARY_OPTIONS
-IGNORE:4006 #warning LNK4006: main already defined in x.cpp.obj; second definition ignored
)
+ add_compile_options(
+ -wd4244 # warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data
+ -wd4312 # warning C4312: 'reinterpret_cast': conversion from 'GLenum' to 'void *' of greater size
+ -wd4251 # warning C4251: 't::f': class 'x' needs to have dll-interface to be used by clients of class 'y'
+ -wd4456 # warning C4456: declaration of 'x' hides previous local declaration
+ -wd4457 # #warning C4457: declaration of 'name' hides function parameter
+ #-wd4530 # warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
+ -wd4244 # warning C4244: 'initializing': conversion from 'unsigned int' to '_Ty', possible loss of data
+ )
else()
add_compile_options(
-Wno-error
@@ -137,7 +146,7 @@ endif()
if(FLOORMAT_SUBMODULE-DEPENDENCIES)
if(MSVC)
- target_compile_options(CorradeTestSuite PRIVATE -EHsc)
+ target_compile_options(CorradeTestSuiteObjects PRIVATE -EHsc)
endif()
endif()
diff --git a/main/editor.hpp b/main/editor.hpp
index f9e2def7..942185ac 100644
--- a/main/editor.hpp
+++ b/main/editor.hpp
@@ -47,7 +47,7 @@ private:
std::string _name;
std::map<std::string, std::shared_ptr<tile_atlas>> _atlases;
- std::tuple<std::shared_ptr<tile_atlas>, std::uint32_t> _selected_tile;
+ std::tuple<std::shared_ptr<tile_atlas>, std::uint8_t> _selected_tile;
std::tuple<std::shared_ptr<tile_atlas>, std::vector<std::uint8_t>> _permutation;
selection_mode _selection_mode = sel_none;
editor_mode _mode;