yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

general: Resolve -Wclass-memaccess

This commit is contained in:
Morph 2022-10-21 02:34:07 -04:00
parent 347432524c
commit 6908ea2284
3 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ Result InfoUpdater::UpdateVoices(VoiceContext& voice_context,
voice_info.Initialize(); voice_info.Initialize();
for (u32 channel = 0; channel < in_param.channel_count; channel++) { for (u32 channel = 0; channel < in_param.channel_count; channel++) {
std::memset(voice_states[channel], 0, sizeof(VoiceState)); *voice_states[channel] = {};
} }
} }

View File

@ -94,7 +94,7 @@ void BiquadFilterCommand::Dump([[maybe_unused]] const ADSP::CommandListProcessor
void BiquadFilterCommand::Process(const ADSP::CommandListProcessor& processor) { void BiquadFilterCommand::Process(const ADSP::CommandListProcessor& processor) {
auto state_{reinterpret_cast<VoiceState::BiquadFilterState*>(state)}; auto state_{reinterpret_cast<VoiceState::BiquadFilterState*>(state)};
if (needs_init) { if (needs_init) {
std::memset(state_, 0, sizeof(VoiceState::BiquadFilterState)); *state_ = {};
} }
auto input_buffer{ auto input_buffer{

View File

@ -30,7 +30,7 @@ void MultiTapBiquadFilterCommand::Process(const ADSP::CommandListProcessor& proc
for (u32 i = 0; i < filter_tap_count; i++) { for (u32 i = 0; i < filter_tap_count; i++) {
auto state{reinterpret_cast<VoiceState::BiquadFilterState*>(states[i])}; auto state{reinterpret_cast<VoiceState::BiquadFilterState*>(states[i])};
if (needs_init[i]) { if (needs_init[i]) {
std::memset(state, 0, sizeof(VoiceState::BiquadFilterState)); *state = {};
} }
ApplyBiquadFilterFloat(output_buffer, input_buffer, biquads[i].b, biquads[i].a, *state, ApplyBiquadFilterFloat(output_buffer, input_buffer, biquads[i].b, biquads[i].a, *state,