[UI] Fix build error in file_picker_win.cc using decltype

This commit is contained in:
Triang3l 2018-10-23 10:54:16 +03:00 committed by GitHub
parent 2b03a9e095
commit 00adfcadf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -34,11 +34,14 @@ class CDialogEventHandler : public IFileDialogEvents,
public:
// IUnknown methods
IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) {
// dwOffset may be a DWORD or an int depending on compiler/SDK version.
static const QITAB qit[] = {
{&__uuidof(IFileDialogEvents),
(int)OFFSETOFCLASS(IFileDialogEvents, CDialogEventHandler)},
static_cast<decltype(qit[0].dwOffset)>(
OFFSETOFCLASS(IFileDialogEvents, CDialogEventHandler))},
{&__uuidof(IFileDialogControlEvents),
(int)OFFSETOFCLASS(IFileDialogControlEvents, CDialogEventHandler)},
static_cast<decltype(qit[1].dwOffset)>(
OFFSETOFCLASS(IFileDialogControlEvents, CDialogEventHandler))},
{0},
};
return QISearch(this, qit, riid, ppv);