diff options
| author | 2020-09-25 00:28:35 -0400 | |
|---|---|---|
| committer | 2020-09-25 01:22:47 -0400 | |
| commit | 8b4ecf22d485958f69ecbd2fa4ca55d9ce393826 (patch) | |
| tree | 8f920f5ff338f8dcc38fea54c5f3df30c5d35c44 /src/audio_core/info_updater.cpp | |
| parent | effect_context: Make use of explicit where applicable (diff) | |
| download | yuzu-8b4ecf22d485958f69ecbd2fa4ca55d9ce393826.tar.gz yuzu-8b4ecf22d485958f69ecbd2fa4ca55d9ce393826.tar.xz yuzu-8b4ecf22d485958f69ecbd2fa4ca55d9ce393826.zip | |
audio_core: Resolve sign conversion warnings
While were at it, we can also enable sign conversion warnings and other
common warnings as errors to prevent these from creeping back into the
codebase.
Diffstat (limited to 'src/audio_core/info_updater.cpp')
| -rw-r--r-- | src/audio_core/info_updater.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/audio_core/info_updater.cpp b/src/audio_core/info_updater.cpp index f53ce21a5..2940e53a9 100644 --- a/src/audio_core/info_updater.cpp +++ b/src/audio_core/info_updater.cpp | |||
| @@ -64,7 +64,6 @@ bool InfoUpdater::UpdateBehaviorInfo(BehaviorInfo& in_behavior_info) { | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | bool InfoUpdater::UpdateMemoryPools(std::vector<ServerMemoryPoolInfo>& memory_pool_info) { | 66 | bool InfoUpdater::UpdateMemoryPools(std::vector<ServerMemoryPoolInfo>& memory_pool_info) { |
| 67 | const auto force_mapping = behavior_info.IsMemoryPoolForceMappingEnabled(); | ||
| 68 | const auto memory_pool_count = memory_pool_info.size(); | 67 | const auto memory_pool_count = memory_pool_info.size(); |
| 69 | const auto total_memory_pool_in = sizeof(ServerMemoryPoolInfo::InParams) * memory_pool_count; | 68 | const auto total_memory_pool_in = sizeof(ServerMemoryPoolInfo::InParams) * memory_pool_count; |
| 70 | const auto total_memory_pool_out = sizeof(ServerMemoryPoolInfo::OutParams) * memory_pool_count; | 69 | const auto total_memory_pool_out = sizeof(ServerMemoryPoolInfo::OutParams) * memory_pool_count; |
| @@ -174,7 +173,7 @@ bool InfoUpdater::UpdateVoices(VoiceContext& voice_context, | |||
| 174 | } | 173 | } |
| 175 | // Voice states for each channel | 174 | // Voice states for each channel |
| 176 | std::array<VoiceState*, AudioCommon::MAX_CHANNEL_COUNT> voice_states{}; | 175 | std::array<VoiceState*, AudioCommon::MAX_CHANNEL_COUNT> voice_states{}; |
| 177 | ASSERT(in_params.id < voice_count); | 176 | ASSERT(static_cast<std::size_t>(in_params.id) < voice_count); |
| 178 | 177 | ||
| 179 | // Grab our current voice info | 178 | // Grab our current voice info |
| 180 | auto& voice_info = voice_context.GetInfo(static_cast<std::size_t>(in_params.id)); | 179 | auto& voice_info = voice_context.GetInfo(static_cast<std::size_t>(in_params.id)); |
| @@ -352,8 +351,8 @@ ResultCode InfoUpdater::UpdateMixes(MixContext& mix_context, std::size_t mix_buf | |||
| 352 | for (std::size_t i = 0; i < mix_count; i++) { | 351 | for (std::size_t i = 0; i < mix_count; i++) { |
| 353 | const auto& in = mix_in_params[i]; | 352 | const auto& in = mix_in_params[i]; |
| 354 | total_buffer_count += in.buffer_count; | 353 | total_buffer_count += in.buffer_count; |
| 355 | if (in.dest_mix_id > mix_count && in.dest_mix_id != AudioCommon::NO_MIX && | 354 | if (static_cast<std::size_t>(in.dest_mix_id) > mix_count && |
| 356 | in.mix_id != AudioCommon::FINAL_MIX) { | 355 | in.dest_mix_id != AudioCommon::NO_MIX && in.mix_id != AudioCommon::FINAL_MIX) { |
| 357 | LOG_ERROR( | 356 | LOG_ERROR( |
| 358 | Audio, | 357 | Audio, |
| 359 | "Invalid mix destination, mix_id={:X}, dest_mix_id={:X}, mix_buffer_count={:X}", | 358 | "Invalid mix destination, mix_id={:X}, dest_mix_id={:X}, mix_buffer_count={:X}", |