diff options
4 files changed, 11 insertions, 11 deletions
diff --git a/shell/source/win32/shlxthandler/classfactory.cxx b/shell/source/win32/shlxthandler/classfactory.cxx index e7384d36b577..95da69252089 100644 --- a/shell/source/win32/shlxthandler/classfactory.cxx +++ b/shell/source/win32/shlxthandler/classfactory.cxx @@ -99,7 +99,7 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance( pUnk = static_cast<IQueryInfo*>(new CInfoTip()); else if (CLSID_COLUMN_HANDLER == m_Clsid) - pUnk = static_cast<IColumnProvider*>(new CColumnInfo()); + pUnk = new CColumnInfo(); else if (CLSID_THUMBVIEWER_HANDLER == m_Clsid) pUnk = static_cast<IExtractImage*>(new CThumbviewer()); diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx index c036a63f8f7d..81393140d51c 100644 --- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx +++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx @@ -77,7 +77,7 @@ COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CColumnInfo::QueryInterface(REFII if (IID_IUnknown == riid || IID_IColumnProvider == riid) { - IUnknown* pUnk = static_cast<IColumnProvider*>(this); + IUnknown* pUnk = this; pUnk->AddRef(); *ppvObject = pUnk; return S_OK; diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index 7088dfbc027b..c45c69930cfb 100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -127,15 +127,15 @@ HRESULT STDMETHODCALLTYPE COooFilter::QueryInterface( { IUnknown *pUnkTemp = nullptr; if ( IID_IFilter == riid ) - pUnkTemp = static_cast<IUnknown *>(static_cast<IFilter *>(this)); + pUnkTemp = static_cast<IFilter *>(this); else if ( IID_IPersistFile == riid ) - pUnkTemp = static_cast<IUnknown *>(static_cast<IPersistFile *>(this)); + pUnkTemp = static_cast<IPersistFile *>(this); else if ( IID_IPersist == riid ) - pUnkTemp = static_cast<IUnknown *>(static_cast<IPersist *>(static_cast<IPersistFile *>(this))); + pUnkTemp = static_cast<IPersistFile *>(this); else if (IID_IPersistStream == riid) - pUnkTemp = static_cast<IUnknown *>(static_cast<IPersistStream *>(this)); + pUnkTemp = static_cast<IPersistStream *>(this); else if ( IID_IUnknown == riid ) - pUnkTemp = static_cast<IUnknown *>(static_cast<IPersist *>(static_cast<IPersistFile *>(this))); + pUnkTemp = static_cast<IPersistFile *>(this); else { *ppvObject = nullptr; @@ -723,9 +723,9 @@ HRESULT STDMETHODCALLTYPE COooFilterCF::QueryInterface(REFIID riid, void ** ppv IUnknown *pUnkTemp; if ( IID_IClassFactory == riid ) - pUnkTemp = static_cast<IUnknown *>(static_cast<IClassFactory *>(this)); + pUnkTemp = this; else if ( IID_IUnknown == riid ) - pUnkTemp = static_cast<IUnknown *>(this); + pUnkTemp = this; else { *ppvObject = nullptr; @@ -882,7 +882,7 @@ extern "C" HRESULT STDMETHODCALLTYPE DllGetClassObject( if ( CLSID_COooFilter == cid ) { pImpl = new COooFilterCF; - pResult = static_cast<IUnknown *>(pImpl); + pResult = pImpl; } else return CLASS_E_CLASSNOTAVAILABLE; diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx index ad5cbe03b0e1..657664ff5866 100644 --- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx +++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx @@ -157,7 +157,7 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::QueryInterface(REFIID riid, void __ if ((IID_IUnknown == riid) || (IID_IStream == riid)) { - pUnk = static_cast<IStream*>(this); + pUnk = this; pUnk->AddRef(); *ppvObject = pUnk; return S_OK; |