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

Avoid non-constant-expression cannot be narrowed on Windows on mingw.
This commit is contained in:
Rémi Verschelde 2024-01-31 10:55:19 +01:00
commit 6287d7ce70
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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);