Merge pull request #8911 from lioncash/cexpr-string
audio_device: Make AudioDeviceName constructor constexpr
This commit is contained in:
commit
60aa942210
6 changed files with 40 additions and 27 deletions
|
@ -246,9 +246,8 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) {
|
|||
const auto write_count =
|
||||
static_cast<u32>(ctx.GetWriteBufferSize() / sizeof(AudioDevice::AudioDeviceName));
|
||||
std::vector<AudioDevice::AudioDeviceName> device_names{};
|
||||
std::string print_names{};
|
||||
if (write_count > 0) {
|
||||
device_names.push_back(AudioDevice::AudioDeviceName("DeviceOut"));
|
||||
device_names.emplace_back("DeviceOut");
|
||||
LOG_DEBUG(Service_Audio, "called. \nName=DeviceOut");
|
||||
} else {
|
||||
LOG_DEBUG(Service_Audio, "called. Empty buffer passed in.");
|
||||
|
|
|
@ -252,7 +252,7 @@ private:
|
|||
|
||||
std::vector<AudioDevice::AudioDeviceName> out_names{};
|
||||
|
||||
u32 out_count = impl->ListAudioDeviceName(out_names, in_count);
|
||||
const u32 out_count = impl->ListAudioDeviceName(out_names, in_count);
|
||||
|
||||
std::string out{};
|
||||
for (u32 i = 0; i < out_count; i++) {
|
||||
|
@ -365,7 +365,7 @@ private:
|
|||
|
||||
std::vector<AudioDevice::AudioDeviceName> out_names{};
|
||||
|
||||
u32 out_count = impl->ListAudioOutputDeviceName(out_names, in_count);
|
||||
const u32 out_count = impl->ListAudioOutputDeviceName(out_names, in_count);
|
||||
|
||||
std::string out{};
|
||||
for (u32 i = 0; i < out_count; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue