Use C++17 by default

Plus C++ standard conformance fixes.
This commit is contained in:
ge0rdi
2018-07-29 21:39:35 +02:00
committed by ge0rdi
parent 07a5a7ba72
commit 16de25a8b0
33 changed files with 203 additions and 97 deletions

View File

@@ -165,6 +165,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -199,6 +201,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -232,6 +236,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -266,6 +272,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -302,6 +310,8 @@
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -336,6 +346,8 @@
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@@ -84,6 +84,8 @@
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -105,6 +107,8 @@
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -128,6 +132,8 @@
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@@ -88,7 +88,7 @@ LRESULT CALLBACK CExplorerBHO::SubclassTreeProc( HWND hWnd, UINT uMsg, WPARAM wP
CComPtr<IShellView> pView;
if (pThis->m_pBrowser && SUCCEEDED(pThis->m_pBrowser->QueryActiveShellView(&pView)))
{
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
CComPtr<IPersistFolder2> pFolder;
CAbsolutePidl pidl2;
@@ -319,7 +319,7 @@ bool CExplorerBHO::GetStatusText( wchar_t *buf, int size, const wchar_t *oldText
CComPtr<IShellView> pView;
if (m_pBrowser && SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
CComPtr<IPersistFolder2> pFolder;
if (pView2 && SUCCEEDED(pView2->GetFolder(IID_IPersistFolder2,(void**)&pFolder)))
@@ -332,7 +332,7 @@ bool CExplorerBHO::GetStatusText( wchar_t *buf, int size, const wchar_t *oldText
PITEMID_CHILD child;
if (SUCCEEDED(pView2->Items(SVGIO_SELECTION,IID_IEnumIDList,(void**)&pEnum)) && pEnum && pEnum->Next(1,&child,NULL)==S_OK)
{
CComQIPtr<IShellFolder> pFolder2=pFolder;
CComQIPtr<IShellFolder> pFolder2(pFolder);
if (pFolder2)
{
CComPtr<IQueryInfo> pQueryInfo;
@@ -431,12 +431,12 @@ void CExplorerBHO::GetFileSize( wchar_t *buf, int size )
int time0=GetTickCount();
if (m_pBrowser && SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
CComPtr<IPersistFolder2> pFolder;
CAbsolutePidl pidl;
if (pView2 && SUCCEEDED(pView2->GetFolder(IID_IPersistFolder2,(void**)&pFolder)) && SUCCEEDED(pFolder->GetCurFolder(&pidl)))
{
CComQIPtr<IShellFolder2> pFolder2=pFolder;
CComQIPtr<IShellFolder2> pFolder2(pFolder);
UINT type=SVGIO_SELECTION;
int count, selCount;
if (SUCCEEDED(pView2->ItemCount(SVGIO_ALLVIEW,&count)))
@@ -1414,7 +1414,7 @@ STDMETHODIMP CExplorerBHO::OnDocumentComplete( IDispatch *pDisp, VARIANT *URL )
m_pBrowser->QueryActiveShellView(&pView);
if (pView)
{
CComQIPtr<IFolderView> pFolderView=pView;
CComQIPtr<IFolderView> pFolderView(pView);
if (pFolderView)
{
if (GetSettingBool(L"ShowHeaders"))
@@ -1425,7 +1425,7 @@ STDMETHODIMP CExplorerBHO::OnDocumentComplete( IDispatch *pDisp, VARIANT *URL )
// The code to turn on the headers is borrowed from the Explorer7Fixes project under the terms of the MIT license:
// http://github.com/ijprest/Explorer7Fixes - Copyright (c) 2010 Ian Prest
CComQIPtr<IFolderView2> pView2=pFolderView;
CComQIPtr<IFolderView2> pView2(pFolderView);
if (pView2)
{
// Turn on the sort header!
@@ -1474,7 +1474,7 @@ STDMETHODIMP CExplorerBHO::OnDocumentComplete( IDispatch *pDisp, VARIANT *URL )
}
if (GetSettingBool(L"HideScrollTip"))
{
CComQIPtr<IFolderViewOptions> pOptions=m_pBrowser;
CComQIPtr<IFolderViewOptions> pOptions(m_pBrowser);
if (pOptions)
pOptions->SetFolderViewOptions(FVO_NOSCROLLTIPS,FVO_NOSCROLLTIPS);
}

View File

@@ -440,7 +440,7 @@ void CBandWindow::SendEmail( void )
if (FAILED(m_pBrowser->QueryActiveShellView(&pView))) return;
// check if there is anything selected
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
int count;
if (pView2 && SUCCEEDED(pView2->ItemCount(SVGIO_SELECTION,&count)) && count==0)
return;
@@ -449,7 +449,7 @@ void CBandWindow::SendEmail( void )
CComPtr<IDataObject> pDataObj;
if (FAILED(pView->GetItemObject(SVGIO_SELECTION,IID_IDataObject,(void**)&pDataObj)))
return;
CComQIPtr<IDataObjectAsyncCapability> pAsync=pDataObj;
CComQIPtr<IDataObjectAsyncCapability> pAsync(pDataObj);
if (pAsync)
pAsync->SetAsyncMode(FALSE);
@@ -494,7 +494,7 @@ void CBandWindow::SendToZip( void )
if (FAILED(m_pBrowser->QueryActiveShellView(&pView))) return;
// check if there is anything selected
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
CComPtr<IShellFolder> pFolder;
if (FAILED(pView2->GetFolder(IID_IShellFolder,(void**)&pFolder)) || !pFolder) return;
@@ -507,7 +507,7 @@ void CBandWindow::SendToZip( void )
CComPtr<IDataObject> pDataObj;
if (FAILED(pView->GetItemObject(SVGIO_SELECTION,IID_IDataObject,(void**)&pDataObj)))
return;
CComQIPtr<IDataObjectAsyncCapability> pAsync=pDataObj;
CComQIPtr<IDataObjectAsyncCapability> pAsync(pDataObj);
if (pAsync)
pAsync->SetAsyncMode(FALSE);
@@ -515,7 +515,7 @@ void CBandWindow::SendToZip( void )
CComPtr<IDropTarget> pDropTarget;
if (SUCCEEDED(CoCreateInstance(CLSID_SendToZip,NULL,CLSCTX_ALL,IID_IDropTarget,(void **)&pDropTarget)))
{
CComQIPtr<IObjectWithSite> pDropWithSite=pDropTarget;
CComQIPtr<IObjectWithSite> pDropWithSite(pDropTarget);
if (pDropWithSite)
{
CComObject<CSendToZipHelper> *pHelper;
@@ -568,7 +568,7 @@ void CBandWindow::NewFolder( void )
{
CComPtr<IShellView> pView;
if (FAILED(m_pBrowser->QueryActiveShellView(&pView))) return;
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
if (!pView2) return;
{
@@ -705,7 +705,7 @@ void CBandWindow::ExecuteCommandFile( const wchar_t *pText )
CComPtr<IShellView> pView;
if (SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
if (!pView2) return;
CComPtr<IShellFolder> pFolder;
if (FAILED(pView2->GetFolder(IID_IShellFolder,(void**)&pFolder)) || !pFolder) return;
@@ -785,7 +785,7 @@ void CBandWindow::ExecuteCustomCommand( const wchar_t *pCommand )
{
CComPtr<IPersistFolder2> pFolder;
CAbsolutePidl pidl;
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
if (pView2 && SUCCEEDED(pView2->GetFolder(IID_IPersistFolder2,(void**)&pFolder)) && SUCCEEDED(pFolder->GetCurFolder(&pidl)))
{
// get current path
@@ -900,13 +900,13 @@ void CBandWindow::ExecuteCustomCommand( const wchar_t *pCommand )
}
else if (_wcsicmp(exe,L"sortby")==0)
{
CComQIPtr<IFolderView2> pView2=pView;
CComQIPtr<IFolderView2> pView2(pView);
if (pView2)
ViewByProperty(pView2,params,false);
}
else if (_wcsicmp(exe,L"groupby")==0)
{
CComQIPtr<IFolderView2> pView2=pView;
CComQIPtr<IFolderView2> pView2(pView);
if (pView2)
ViewByProperty(pView2,params,true);
}
@@ -1128,7 +1128,7 @@ LRESULT CBandWindow::OnCommand( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& b
CComPtr<IShellView> pView;
if (SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
CComQIPtr<IFolderView2> pView2=pView;
CComQIPtr<IFolderView2> pView2(pView);
if (pView2) pView2->DoRename();
}
return TRUE;
@@ -1283,7 +1283,7 @@ LRESULT CBandWindow::OnCommand( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& b
if (FAILED(m_pBrowser->QueryActiveShellView(&pView)))
return TRUE;
CComQIPtr<IFolderView2> pView2=pView;
CComQIPtr<IFolderView2> pView2(pView);
if (!pView2) return TRUE;
// ID_DESELECT
@@ -1730,7 +1730,7 @@ void CBandWindow::UpdateToolbar( void )
m_pBrowser->QueryActiveShellView(&pView);
if (pView)
{
CComQIPtr<IFolderView> pView2=pView;
CComQIPtr<IFolderView> pView2(pView);
if (pView2)
{
CComPtr<IPersistFolder2> pFolder;