Skip to content

Commit

Permalink
Merge pull request #87720 from fire/llvm-mingw-qitabent
Browse files Browse the repository at this point in the history
Avoid non-constant-expression cannot be narrowed on Windows on mingw.
  • Loading branch information
akien-mga committed Jan 31, 2024
2 parents 1c916c3 + f711b4f commit 6287d7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,13 @@ class FileDialogEventHandler : public IFileDialogEvents, public IFileDialogContr
// 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);
Expand Down

0 comments on commit 6287d7c

Please sign in to comment.