[UI] Fix build error in file_picker_win.cc using decltype
This commit is contained in:
parent
2b03a9e095
commit
00adfcadf9
|
@ -34,11 +34,14 @@ class CDialogEventHandler : public IFileDialogEvents,
|
||||||
public:
|
public:
|
||||||
// IUnknown methods
|
// IUnknown methods
|
||||||
IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) {
|
IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) {
|
||||||
|
// dwOffset may be a DWORD or an int depending on compiler/SDK version.
|
||||||
static const QITAB qit[] = {
|
static const QITAB qit[] = {
|
||||||
{&__uuidof(IFileDialogEvents),
|
{&__uuidof(IFileDialogEvents),
|
||||||
(int)OFFSETOFCLASS(IFileDialogEvents, CDialogEventHandler)},
|
static_cast<decltype(qit[0].dwOffset)>(
|
||||||
|
OFFSETOFCLASS(IFileDialogEvents, CDialogEventHandler))},
|
||||||
{&__uuidof(IFileDialogControlEvents),
|
{&__uuidof(IFileDialogControlEvents),
|
||||||
(int)OFFSETOFCLASS(IFileDialogControlEvents, CDialogEventHandler)},
|
static_cast<decltype(qit[1].dwOffset)>(
|
||||||
|
OFFSETOFCLASS(IFileDialogControlEvents, CDialogEventHandler))},
|
||||||
{0},
|
{0},
|
||||||
};
|
};
|
||||||
return QISearch(this, qit, riid, ppv);
|
return QISearch(this, qit, riid, ppv);
|
||||||
|
|
Loading…
Reference in New Issue