Merge pull request #8315 from CookiePLMonster/conformance-fixes

Conformance fixes
This commit is contained in:
Connor McLaughlin 2019-08-17 11:54:41 +10:00 committed by GitHub
commit 0a7265f807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -152,7 +152,7 @@ IMMDevice* WASAPIStream::GetDeviceByName(std::string name)
__uuidof(IMMDeviceEnumerator), reinterpret_cast<LPVOID*>(&enumerator));
if (!HandleWinAPI("Failed to create MMDeviceEnumerator", result))
return false;
return nullptr;
IMMDeviceCollection* devices;
result = enumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE, &devices);

View File

@ -483,7 +483,7 @@ std::string UTF16ToCP(u32 code_page, std::wstring_view input)
output.resize(size);
if (size != WideCharToMultiByte(code_page, 0, input.data(), static_cast<int>(input.size()),
&output[0], static_cast<int>(output.size()), nullptr, false))
&output[0], static_cast<int>(output.size()), nullptr, nullptr))
{
const DWORD error_code = GetLastError();
ERROR_LOG(COMMON, "WideCharToMultiByte Error in String '%s': %lu",

View File

@ -88,9 +88,9 @@
<!--Enable latest C++ standard-->
<LanguageStandard>stdcpplatest</LanguageStandard>
<!--Enable Standard Conformance-->
<AdditionalOptions>/permissive- %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
<!--Enforce some behaviors as standards-conformant when they don't default as such-->
<AdditionalOptions>/Zc:inline /Zc:throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/Zc:throwingNew /volatile:iso %(AdditionalOptions)</AdditionalOptions>
<!--Enable detailed debug info-->
<AdditionalOptions>/Zo %(AdditionalOptions)</AdditionalOptions>
<!--Treat sources as utf-8-->
@ -103,7 +103,7 @@
seem to be a way to only ignore the specific instance we don't care about...
4351 new behavior: elements of array 'array' will be default initialized
-->
<DisableSpecificWarnings>4996;4351</DisableSpecificWarnings>
<DisableSpecificWarnings>4996;4351;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<!-- Warnings one may want to ignore when using Level4.
4201 nonstandard extension used : nameless struct/union
4127 conditional expression is constant