2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

sdl2_sink: Inline variable init into if condition

Co-authored-by: Mai <mathew1800@gmail.com>
This commit is contained in:
lat9nq 2022-10-16 20:37:11 -04:00
parent 9fe077635e
commit 4b773b15a6

View file

@ -230,8 +230,7 @@ std::vector<std::string> ListSDLSinkDevices(bool capture) {
const int device_count = SDL_GetNumAudioDevices(capture); const int device_count = SDL_GetNumAudioDevices(capture);
for (int i = 0; i < device_count; ++i) { for (int i = 0; i < device_count; ++i) {
const char* name = SDL_GetAudioDeviceName(i, capture); if (const char* name = SDL_GetAudioDeviceName(i, capture)) {
if (name != nullptr) {
device_list.emplace_back(name); device_list.emplace_back(name);
} }
} }