From 084d7d6b014443be7625fb9d8f1ddd309a22f6f4 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 7 Jun 2022 17:02:29 -0400 Subject: common: Change semantics of UNREACHABLE to unconditionally crash --- src/audio_core/command_generator.cpp | 4 ++-- src/audio_core/effect_context.cpp | 4 ++-- src/audio_core/splitter_context.cpp | 2 +- src/audio_core/voice_context.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/audio_core') diff --git a/src/audio_core/command_generator.cpp b/src/audio_core/command_generator.cpp index ff20ed00f..f97520820 100644 --- a/src/audio_core/command_generator.cpp +++ b/src/audio_core/command_generator.cpp @@ -429,7 +429,7 @@ void CommandGenerator::GenerateDataSourceCommand(ServerVoiceInfo& voice_info, Vo in_params.node_id); break; default: - UNREACHABLE_MSG("Unimplemented sample format={}", in_params.sample_format); + ASSERT_MSG(false, "Unimplemented sample format={}", in_params.sample_format); } } } @@ -1312,7 +1312,7 @@ void CommandGenerator::DecodeFromWaveBuffers(ServerVoiceInfo& voice_info, std::s samples_to_read - samples_read, channel, temp_mix_offset); break; default: - UNREACHABLE_MSG("Unimplemented sample format={}", in_params.sample_format); + ASSERT_MSG(false, "Unimplemented sample format={}", in_params.sample_format); } temp_mix_offset += samples_decoded; diff --git a/src/audio_core/effect_context.cpp b/src/audio_core/effect_context.cpp index 51059580e..79bcd1192 100644 --- a/src/audio_core/effect_context.cpp +++ b/src/audio_core/effect_context.cpp @@ -50,7 +50,7 @@ EffectBase* EffectContext::RetargetEffect(std::size_t i, EffectType effect) { effects[i] = std::make_unique(); break; default: - UNREACHABLE_MSG("Unimplemented effect {}", effect); + ASSERT_MSG(false, "Unimplemented effect {}", effect); effects[i] = std::make_unique(); } return GetInfo(i); @@ -104,7 +104,7 @@ void EffectI3dl2Reverb::Update(EffectInfo::InParams& in_params) { auto& params = GetParams(); const auto* reverb_params = reinterpret_cast(in_params.raw.data()); if (!ValidChannelCountForEffect(reverb_params->max_channels)) { - UNREACHABLE_MSG("Invalid reverb max channel count {}", reverb_params->max_channels); + ASSERT_MSG(false, "Invalid reverb max channel count {}", reverb_params->max_channels); return; } diff --git a/src/audio_core/splitter_context.cpp b/src/audio_core/splitter_context.cpp index 1751d0212..10646dc05 100644 --- a/src/audio_core/splitter_context.cpp +++ b/src/audio_core/splitter_context.cpp @@ -483,7 +483,7 @@ bool NodeStates::DepthFirstSearch(EdgeMatrix& edge_matrix) { // Add more work index_stack.push(j); } else if (node_state == NodeStates::State::InFound) { - UNREACHABLE_MSG("Node start marked as found"); + ASSERT_MSG(false, "Node start marked as found"); ResetState(); return false; } diff --git a/src/audio_core/voice_context.cpp b/src/audio_core/voice_context.cpp index c8e4a6caf..f58a5c754 100644 --- a/src/audio_core/voice_context.cpp +++ b/src/audio_core/voice_context.cpp @@ -114,7 +114,7 @@ void ServerVoiceInfo::UpdateParameters(const VoiceInfo::InParams& voice_in, in_params.current_playstate = ServerPlayState::Play; break; default: - UNREACHABLE_MSG("Unknown playstate {}", voice_in.play_state); + ASSERT_MSG(false, "Unknown playstate {}", voice_in.play_state); break; } @@ -410,7 +410,7 @@ bool ServerVoiceInfo::UpdateParametersForCommandGeneration( return in_params.should_depop; } default: - UNREACHABLE_MSG("Invalid playstate {}", in_params.current_playstate); + ASSERT_MSG(false, "Invalid playstate {}", in_params.current_playstate); } return false; -- cgit v1.2.3