diff options
-rw-r--r-- | src/audio_core/algorithm/filter.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/am/am.cpp | 7 | ||||
-rw-r--r-- | src/video_core/engines/shader_bytecode.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/audio_core/algorithm/filter.cpp b/src/audio_core/algorithm/filter.cpp index 403b8503f..9fcd0614d 100644 --- a/src/audio_core/algorithm/filter.cpp +++ b/src/audio_core/algorithm/filter.cpp @@ -46,7 +46,7 @@ void Filter::Process(std::vector<s16>& signal) { out[0][ch] = b0 * in[0][ch] + b1 * in[1][ch] + b2 * in[2][ch] - a1 * out[1][ch] - a2 * out[2][ch]; - signal[i * 2 + ch] = std::clamp(out[0][ch], -32768.0, 32767.0); + signal[i * 2 + ch] = static_cast<s16>(std::clamp(out[0][ch], -32768.0, 32767.0)); } } } diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index c524e7a48..78d551a8a 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <array> #include <cinttypes> #include <stack> #include "core/core.h" @@ -625,16 +626,16 @@ IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationF } void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { - constexpr u8 data[0x88] = { + constexpr std::array<u8, 0x88> data{{ 0xca, 0x97, 0x94, 0xc7, // Magic 1, 0, 0, 0, // IsAccountSelected (bool) 1, 0, 0, 0, // User Id (word 0) 0, 0, 0, 0, // User Id (word 1) 0, 0, 0, 0, // User Id (word 2) 0, 0, 0, 0 // User Id (word 3) - }; + }}; - std::vector<u8> buffer(data, data + sizeof(data)); + std::vector<u8> buffer(data.begin(), data.end()); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 875b90359..67194b0e3 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -518,7 +518,7 @@ union Instruction { return TextureType::Texture1D; } if (texture_info == 2 || texture_info == 8 || texture_info == 12 || - texture_info >= 4 && texture_info <= 6) { + (texture_info >= 4 && texture_info <= 6)) { return TextureType::Texture2D; } if (texture_info == 7) { |