mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 05:23:16 +00:00
audio_manager: Remove redundant cast in ThreadFunc()
We can just use a local here to get rid of a second cast.
This commit is contained in:
parent
e48e22eb52
commit
75d6fe3669
|
@ -58,19 +58,21 @@ void AudioManager::ThreadFunc() {
|
||||||
running = true;
|
running = true;
|
||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
auto timed_out{events.Wait(l, std::chrono::seconds(2))};
|
const auto timed_out{events.Wait(l, std::chrono::seconds(2))};
|
||||||
|
|
||||||
if (events.CheckAudioEventSet(Event::Type::Max)) {
|
if (events.CheckAudioEventSet(Event::Type::Max)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < buffer_events.size(); i++) {
|
for (size_t i = 0; i < buffer_events.size(); i++) {
|
||||||
if (events.CheckAudioEventSet(Event::Type(i)) || timed_out) {
|
const auto event_type = static_cast<Event::Type>(i);
|
||||||
|
|
||||||
|
if (events.CheckAudioEventSet(event_type) || timed_out) {
|
||||||
if (buffer_events[i]) {
|
if (buffer_events[i]) {
|
||||||
buffer_events[i]();
|
buffer_events[i]();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
events.SetAudioEvent(Event::Type(i), false);
|
events.SetAudioEvent(event_type, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue