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

@@ -62,6 +62,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -83,6 +85,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@@ -60,6 +60,8 @@
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -78,6 +80,8 @@
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@@ -156,19 +156,19 @@ LRESULT CMetroColorViewer::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam
HWND list=GetDlgItem(IDC_LIST1);
{
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,380,L"Name"};
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,380,(LPWSTR)L"Name"};
ListView_InsertColumn(list,0,&column);
}
{
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,50,L"#"};
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,50,(LPWSTR)L"#"};
ListView_InsertColumn(list,1,&column);
}
{
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,L"Code"};
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,(LPWSTR)L"Code"};
ListView_InsertColumn(list,2,&column);
}
{
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,L"Color"};
LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,(LPWSTR)L"Color"};
ListView_InsertColumn(list,3,&column);
}
int order[]={1,0,2,3};

View File

@@ -215,7 +215,7 @@ static void WriteFolder( FILE *f, const wchar_t *path, int tabs, bool bRecursive
wchar_t args[256];
if (FAILED(pLink->GetArguments(args,_countof(args))))
args[0]=0;
CComQIPtr<IPropertyStore> pStore=pLink;
CComQIPtr<IPropertyStore> pStore(pLink);
CString appid;
if (pStore)
{
@@ -647,8 +647,8 @@ static void WriteLogFile( FILE *f )
{
CComString pName;
pProgram->GetDisplayName(SIGDN_NORMALDISPLAY,&pName);
CString name=pName;
CComQIPtr<IShellItem2> pProgram2=pProgram;
CString name(pName);
CComQIPtr<IShellItem2> pProgram2(pProgram);
if (pProgram2)
{
CComString pVersion;

View File

@@ -98,6 +98,8 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;psapi.lib;version.lib;Secur32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -116,6 +118,8 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -137,6 +141,8 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;psapi.lib;version.lib;Secur32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -157,6 +163,8 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>