Sfoglia il codice sorgente

Merge pull request #87720 from fire/llvm-mingw-qitabent

Avoid non-constant-expression cannot be narrowed on Windows on mingw.
Rémi Verschelde 1 anno fa
parent
commit
6287d7ce70
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      platform/windows/display_server_windows.cpp

+ 5 - 0
platform/windows/display_server_windows.cpp

@@ -247,8 +247,13 @@ public:
 	// IUnknown methods
 	HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv) {
 		static const QITAB qit[] = {
+#ifdef __MINGW32__
+			{ &__uuidof(IFileDialogEvents), static_cast<decltype(qit[0].dwOffset)>(OFFSETOFCLASS(IFileDialogEvents, FileDialogEventHandler)) },
+			{ &__uuidof(IFileDialogControlEvents), static_cast<decltype(qit[0].dwOffset)>(OFFSETOFCLASS(IFileDialogControlEvents, FileDialogEventHandler)) },
+#else
 			QITABENT(FileDialogEventHandler, IFileDialogEvents),
 			QITABENT(FileDialogEventHandler, IFileDialogControlEvents),
+#endif
 			{ 0, 0 },
 		};
 		return QISearch(this, qit, riid, ppv);