diff --git a/src/common/d3d12/context.cpp b/src/common/d3d12/context.cpp index 43e49370a..6e29ee405 100644 --- a/src/common/d3d12/context.cpp +++ b/src/common/d3d12/context.cpp @@ -27,13 +27,13 @@ static PFN_D3D12_SERIALIZE_ROOT_SIGNATURE s_d3d12_serialize_root_signature; static bool LoadD3D12Library() { - if (!(s_d3d12_library = LoadLibrary("d3d12.dll")) || - !(s_d3d12_create_device = - reinterpret_cast(GetProcAddress(s_d3d12_library, "D3D12CreateDevice"))) || - !(s_d3d12_get_debug_interface = - reinterpret_cast(GetProcAddress(s_d3d12_library, "D3D12GetDebugInterface"))) || - !(s_d3d12_serialize_root_signature = reinterpret_cast( - GetProcAddress(s_d3d12_library, "D3D12SerializeRootSignature")))) + if ((s_d3d12_library = LoadLibrary("d3d12.dll")) == nullptr || + (s_d3d12_create_device = + reinterpret_cast(GetProcAddress(s_d3d12_library, "D3D12CreateDevice"))) == nullptr || + (s_d3d12_get_debug_interface = reinterpret_cast( + GetProcAddress(s_d3d12_library, "D3D12GetDebugInterface"))) == nullptr || + (s_d3d12_serialize_root_signature = reinterpret_cast( + GetProcAddress(s_d3d12_library, "D3D12SerializeRootSignature"))) == nullptr) { Log_ErrorPrintf("d3d12.dll could not be loaded."); s_d3d12_create_device = nullptr; diff --git a/src/core/cpu_recompiler_code_generator_x64.cpp b/src/core/cpu_recompiler_code_generator_x64.cpp index b261158ad..b7c0e27c6 100644 --- a/src/core/cpu_recompiler_code_generator_x64.cpp +++ b/src/core/cpu_recompiler_code_generator_x64.cpp @@ -20,7 +20,6 @@ constexpr HostReg RARG2 = Xbyak::Operand::RDX; constexpr HostReg RARG3 = Xbyak::Operand::R8; constexpr HostReg RARG4 = Xbyak::Operand::R9; constexpr u32 FUNCTION_CALL_SHADOW_SPACE = 32; -constexpr u64 FUNCTION_CALL_STACK_ALIGNMENT = 16; #elif defined(ABI_SYSV) constexpr HostReg RCPUPTR = Xbyak::Operand::RBP; constexpr HostReg RMEMBASEPTR = Xbyak::Operand::RBX; @@ -30,7 +29,6 @@ constexpr HostReg RARG2 = Xbyak::Operand::RSI; constexpr HostReg RARG3 = Xbyak::Operand::RDX; constexpr HostReg RARG4 = Xbyak::Operand::RCX; constexpr u32 FUNCTION_CALL_SHADOW_SPACE = 0; -constexpr u64 FUNCTION_CALL_STACK_ALIGNMENT = 16; #endif static const Xbyak::Reg8 GetHostReg8(HostReg reg) @@ -798,20 +796,20 @@ void CodeGenerator::EmitDiv(HostReg to_reg_quotient, HostReg to_reg_remainder, H to_reg_remainder != Xbyak::Operand::RAX && to_reg_remainder != Xbyak::Operand::RDX) { // store to the registers we want.. this could be optimized better - if (to_reg_quotient != HostReg_Count) + if (static_cast(to_reg_quotient) != HostReg_Count) m_emit->mov(GetHostReg64(to_reg_quotient), m_emit->rax); - if (to_reg_remainder != HostReg_Count) + if (static_cast(to_reg_remainder) != HostReg_Count) m_emit->mov(GetHostReg64(to_reg_remainder), m_emit->rdx); } else { // store to the registers we want.. this could be optimized better - if (to_reg_quotient != HostReg_Count) + if (static_cast(to_reg_quotient) != HostReg_Count) { m_emit->push(m_emit->rax); m_emit->pop(GetHostReg64(to_reg_quotient)); } - if (to_reg_remainder != HostReg_Count) + if (static_cast(to_reg_remainder) != HostReg_Count) { m_emit->push(m_emit->rdx); m_emit->pop(GetHostReg64(to_reg_remainder)); diff --git a/src/frontend-common/http_downloader_winhttp.cpp b/src/frontend-common/http_downloader_winhttp.cpp index 697d73ca0..c7a3e4c38 100644 --- a/src/frontend-common/http_downloader_winhttp.cpp +++ b/src/frontend-common/http_downloader_winhttp.cpp @@ -255,8 +255,8 @@ bool HTTPDownloaderWinHttp::StartRequest(HTTPDownloader::Request* request) BOOL result; if (req->type == HTTPDownloader::Request::Type::Post) { - const std::wstring_view additionalHeaders(L"Content-Type: application/x-www-form-urlencoded\r\n"); - result = WinHttpSendRequest(req->hRequest, additionalHeaders.data(), additionalHeaders.size(), + const std::wstring_view additional_headers(L"Content-Type: application/x-www-form-urlencoded\r\n"); + result = WinHttpSendRequest(req->hRequest, additional_headers.data(), static_cast(additional_headers.size()), req->post_data.data(), static_cast(req->post_data.size()), static_cast(req->post_data.size()), reinterpret_cast(req)); }