style(sonar): fix cpp:S6185 (#4133)

This commit is contained in:
ReenigneArcher
2025-08-07 23:17:13 -04:00
committed by GitHub
parent a28c20df18
commit dbe80d0f92
17 changed files with 73 additions and 41 deletions

View File

@@ -4,6 +4,9 @@
*/
#define INITGUID
// standard includes
#include <format>
// platform includes
#include <Audioclient.h>
#include <avrt.h>
@@ -168,8 +171,7 @@ namespace {
waveformat.SubFormat == KSDATAFORMAT_SUBTYPE_PCM ? "S" :
"UNKNOWN";
result += std::to_string(waveformat.Samples.wValidBitsPerSample) + " " +
std::to_string(waveformat.Format.nSamplesPerSec) + " ";
result += std::format("{} {} ", static_cast<int>(waveformat.Samples.wValidBitsPerSample), static_cast<int>(waveformat.Format.nSamplesPerSec));
switch (waveformat.dwChannelMask) {
case waveformat_mask_stereo:
@@ -189,7 +191,7 @@ namespace {
break;
default:
result += std::to_string(waveformat.Format.nChannels) + " channels (unrecognized)";
result += std::format("{} channels (unrecognized)", static_cast<int>(waveformat.Format.nChannels));
break;
}