Skip to content

Commit 5d5cd61

Browse files
NeoAdonisv-junyli
authored andcommitted
[audio/sysvad] Use C++17 (#1247)
1 parent 61fe2ec commit 5d5cd61

File tree

9 files changed

+71
-0
lines changed

9 files changed

+71
-0
lines changed

audio/sysvad/APO/AecApo/AecApo.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
</PropertyGroup>
124124
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
125125
<ClCompile>
126+
<LanguageStandard>stdcpp17</LanguageStandard>
126127
<TreatWarningAsError>true</TreatWarningAsError>
127128
<WarningLevel>Level4</WarningLevel>
128129
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -147,6 +148,7 @@
147148
</ItemDefinitionGroup>
148149
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
149150
<ClCompile>
151+
<LanguageStandard>stdcpp17</LanguageStandard>
150152
<TreatWarningAsError>true</TreatWarningAsError>
151153
<WarningLevel>Level4</WarningLevel>
152154
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -172,6 +174,7 @@
172174
</ItemDefinitionGroup>
173175
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
174176
<ClCompile>
177+
<LanguageStandard>stdcpp17</LanguageStandard>
175178
<TreatWarningAsError>true</TreatWarningAsError>
176179
<WarningLevel>Level4</WarningLevel>
177180
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -196,6 +199,7 @@
196199
</ItemDefinitionGroup>
197200
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
198201
<ClCompile>
202+
<LanguageStandard>stdcpp17</LanguageStandard>
199203
<TreatWarningAsError>true</TreatWarningAsError>
200204
<WarningLevel>Level4</WarningLevel>
201205
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>

audio/sysvad/APO/DelayAPO/DelayAPO.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
</PropertyGroup>
124124
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
125125
<ClCompile>
126+
<LanguageStandard>stdcpp17</LanguageStandard>
126127
<TreatWarningAsError>true</TreatWarningAsError>
127128
<WarningLevel>Level4</WarningLevel>
128129
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -147,6 +148,7 @@
147148
</ItemDefinitionGroup>
148149
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
149150
<ClCompile>
151+
<LanguageStandard>stdcpp17</LanguageStandard>
150152
<TreatWarningAsError>true</TreatWarningAsError>
151153
<WarningLevel>Level4</WarningLevel>
152154
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -172,6 +174,7 @@
172174
</ItemDefinitionGroup>
173175
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
174176
<ClCompile>
177+
<LanguageStandard>stdcpp17</LanguageStandard>
175178
<TreatWarningAsError>true</TreatWarningAsError>
176179
<WarningLevel>Level4</WarningLevel>
177180
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -196,6 +199,7 @@
196199
</ItemDefinitionGroup>
197200
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
198201
<ClCompile>
202+
<LanguageStandard>stdcpp17</LanguageStandard>
199203
<TreatWarningAsError>true</TreatWarningAsError>
200204
<WarningLevel>Level4</WarningLevel>
201205
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>

audio/sysvad/APO/KWSApo/KWSApo.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
</PropertyGroup>
124124
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
125125
<ClCompile>
126+
<LanguageStandard>stdcpp17</LanguageStandard>
126127
<TreatWarningAsError>true</TreatWarningAsError>
127128
<WarningLevel>Level4</WarningLevel>
128129
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -147,6 +148,7 @@
147148
</ItemDefinitionGroup>
148149
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
149150
<ClCompile>
151+
<LanguageStandard>stdcpp17</LanguageStandard>
150152
<TreatWarningAsError>true</TreatWarningAsError>
151153
<WarningLevel>Level4</WarningLevel>
152154
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -172,6 +174,7 @@
172174
</ItemDefinitionGroup>
173175
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
174176
<ClCompile>
177+
<LanguageStandard>stdcpp17</LanguageStandard>
175178
<TreatWarningAsError>true</TreatWarningAsError>
176179
<WarningLevel>Level4</WarningLevel>
177180
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -196,6 +199,7 @@
196199
</ItemDefinitionGroup>
197200
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
198201
<ClCompile>
202+
<LanguageStandard>stdcpp17</LanguageStandard>
199203
<TreatWarningAsError>true</TreatWarningAsError>
200204
<WarningLevel>Level4</WarningLevel>
201205
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>

audio/sysvad/APO/SwapAPO/SwapAPO.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
</PropertyGroup>
124124
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
125125
<ClCompile>
126+
<LanguageStandard>stdcpp17</LanguageStandard>
126127
<TreatWarningAsError>true</TreatWarningAsError>
127128
<WarningLevel>Level4</WarningLevel>
128129
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -147,6 +148,7 @@
147148
</ItemDefinitionGroup>
148149
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
149150
<ClCompile>
151+
<LanguageStandard>stdcpp17</LanguageStandard>
150152
<TreatWarningAsError>true</TreatWarningAsError>
151153
<WarningLevel>Level4</WarningLevel>
152154
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -172,6 +174,7 @@
172174
</ItemDefinitionGroup>
173175
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
174176
<ClCompile>
177+
<LanguageStandard>stdcpp17</LanguageStandard>
175178
<TreatWarningAsError>true</TreatWarningAsError>
176179
<WarningLevel>Level4</WarningLevel>
177180
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
@@ -196,6 +199,7 @@
196199
</ItemDefinitionGroup>
197200
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
198201
<ClCompile>
202+
<LanguageStandard>stdcpp17</LanguageStandard>
199203
<TreatWarningAsError>true</TreatWarningAsError>
200204
<WarningLevel>Level4</WarningLevel>
201205
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>

audio/sysvad/EndpointsCommon/EndpointsCommon.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
9595
</ResourceCompile>
9696
<ClCompile>
97+
<LanguageStandard>stdcpp17</LanguageStandard>
9798
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
9899
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
99100
<ExceptionHandling>
@@ -114,6 +115,7 @@
114115
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
115116
</ResourceCompile>
116117
<ClCompile>
118+
<LanguageStandard>stdcpp17</LanguageStandard>
117119
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
118120
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
119121
<ExceptionHandling>
@@ -134,6 +136,7 @@
134136
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
135137
</ResourceCompile>
136138
<ClCompile>
139+
<LanguageStandard>stdcpp17</LanguageStandard>
137140
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
138141
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
139142
<ExceptionHandling>
@@ -154,6 +157,7 @@
154157
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
155158
</ResourceCompile>
156159
<ClCompile>
160+
<LanguageStandard>stdcpp17</LanguageStandard>
157161
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
158162
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
159163
<ExceptionHandling>

audio/sysvad/EndpointsCommon/NewDelete.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,30 @@ void __cdecl operator delete
103103
}
104104

105105

106+
/*****************************************************************************
107+
* ::delete()
108+
*****************************************************************************
109+
* Sized Delete function with alignment.
110+
*/
111+
#ifdef __cpp_aligned_new
112+
void __cdecl operator delete
113+
(
114+
_Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid,
115+
_In_ size_t cbSize,
116+
_In_ std::align_val_t cbAlign
117+
)
118+
{
119+
UNREFERENCED_PARAMETER(cbSize);
120+
UNREFERENCED_PARAMETER(cbAlign);
121+
122+
if (pVoid)
123+
{
124+
ExFreePoolWithTag(pVoid, SYSVAD_POOLTAG);
125+
}
126+
}
127+
#endif // __cpp_aligned_new
128+
129+
106130
/*****************************************************************************
107131
* ::delete()
108132
*****************************************************************************

audio/sysvad/EndpointsCommon/NewDelete.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,21 @@ void __cdecl operator delete
7070
);
7171

7272

73+
/*****************************************************************************
74+
* ::delete()
75+
*****************************************************************************
76+
* Sized Delete function with alignment.
77+
*/
78+
#ifdef __cpp_aligned_new
79+
void __cdecl operator delete
80+
(
81+
_Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid,
82+
_In_ size_t cbSize,
83+
_In_ std::align_val_t cbAlign
84+
);
85+
#endif // __cpp_aligned_new
86+
87+
7388
/*****************************************************************************
7489
* ::delete()
7590
*****************************************************************************

audio/sysvad/KeywordDetectorAdapter/KeywordDetectorContosoAdapter.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
</ItemDefinitionGroup>
112112
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
113113
<ClCompile>
114+
<LanguageStandard>stdcpp17</LanguageStandard>
114115
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
115116
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
116117
<TreatWarningAsError>true</TreatWarningAsError>
@@ -135,6 +136,7 @@
135136
</ItemDefinitionGroup>
136137
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
137138
<ClCompile>
139+
<LanguageStandard>stdcpp17</LanguageStandard>
138140
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
139141
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
140142
<TreatWarningAsError>true</TreatWarningAsError>
@@ -159,6 +161,7 @@
159161
</ItemDefinitionGroup>
160162
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
161163
<ClCompile>
164+
<LanguageStandard>stdcpp17</LanguageStandard>
162165
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
163166
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
164167
<TreatWarningAsError>true</TreatWarningAsError>
@@ -183,6 +186,7 @@
183186
</ItemDefinitionGroup>
184187
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
185188
<ClCompile>
189+
<LanguageStandard>stdcpp17</LanguageStandard>
186190
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
187191
<RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
188192
<TreatWarningAsError>true</TreatWarningAsError>

audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
8989
</ResourceCompile>
9090
<ClCompile>
91+
<LanguageStandard>stdcpp17</LanguageStandard>
9192
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
9293
<TreatWarningAsError>true</TreatWarningAsError>
9394
<WarningLevel>Level4</WarningLevel>
@@ -110,6 +111,7 @@
110111
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
111112
</ResourceCompile>
112113
<ClCompile>
114+
<LanguageStandard>stdcpp17</LanguageStandard>
113115
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
114116
<TreatWarningAsError>true</TreatWarningAsError>
115117
<WarningLevel>Level4</WarningLevel>
@@ -132,6 +134,7 @@
132134
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
133135
</ResourceCompile>
134136
<ClCompile>
137+
<LanguageStandard>stdcpp17</LanguageStandard>
135138
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
136139
<TreatWarningAsError>true</TreatWarningAsError>
137140
<WarningLevel>Level4</WarningLevel>
@@ -154,6 +157,7 @@
154157
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
155158
</ResourceCompile>
156159
<ClCompile>
160+
<LanguageStandard>stdcpp17</LanguageStandard>
157161
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
158162
<TreatWarningAsError>true</TreatWarningAsError>
159163
<WarningLevel>Level4</WarningLevel>
@@ -183,6 +187,7 @@
183187
<AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
184188
</Link>
185189
<ClCompile>
190+
<LanguageStandard>stdcpp17</LanguageStandard>
186191
<!--
187192
Use one of the following pre-processor defines to select the right power management:
188193
- _USE_IPortClsRuntimePower
@@ -213,6 +218,7 @@
213218
<AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
214219
</Link>
215220
<ClCompile>
221+
<LanguageStandard>stdcpp17</LanguageStandard>
216222
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_USE_IPortClsRuntimePower;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
217223
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
218224
<ExceptionHandling>
@@ -235,6 +241,7 @@
235241
<AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
236242
</Link>
237243
<ClCompile>
244+
<LanguageStandard>stdcpp17</LanguageStandard>
238245
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_USE_IPortClsRuntimePower;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
239246
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
240247
<ExceptionHandling>
@@ -257,6 +264,7 @@
257264
<AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
258265
</Link>
259266
<ClCompile>
267+
<LanguageStandard>stdcpp17</LanguageStandard>
260268
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_USE_IPortClsRuntimePower;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
261269
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
262270
<ExceptionHandling>

0 commit comments

Comments
 (0)