Просмотр исходного кода

yuzu/CMakeLists: Disable implicit type narrowing in connect() calls

Prevents hard-to-diagnose bugs from potentially occurring and requires
any type narrowing to be explicitly performed by our code.
Lioncash 7 лет назад
Родитель
Сommit
b5e1e87922
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      src/yuzu/CMakeLists.txt

+ 3 - 0
src/yuzu/CMakeLists.txt

@@ -159,6 +159,9 @@ target_compile_definitions(yuzu PRIVATE
     # Disable implicit conversions from/to C strings
     # Disable implicit conversions from/to C strings
     -DQT_NO_CAST_FROM_ASCII
     -DQT_NO_CAST_FROM_ASCII
     -DQT_NO_CAST_TO_ASCII
     -DQT_NO_CAST_TO_ASCII
+
+    # Disable implicit type narrowing in signal/slot connect() calls.
+    -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 )
 )
 
 
 if (YUZU_ENABLE_COMPATIBILITY_REPORTING)
 if (YUZU_ENABLE_COMPATIBILITY_REPORTING)