Add -Wuseless-cast to FTXUI_DEV_WARNINGS (#728)

Add the -Wuseless-cast to the FTXUI_DEV_WARNINGS and
fix the compiler complaints about useless casts
This commit is contained in:
Stefan Ravn van Overeem
2023-08-19 11:20:04 +02:00
committed by GitHub
parent 1e6df78ec2
commit eb9a701fd7
3 changed files with 9 additions and 5 deletions

View File

@@ -77,6 +77,10 @@ function(ftxui_set_options library)
target_compile_options(${library} PRIVATE "-Wpedantic")
target_compile_options(${library} PRIVATE "-Wshadow")
target_compile_options(${library} PRIVATE "-Wunused")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${library} PRIVATE "-Wuseless-cast")
endif()
endif()
endif()