diff options
author | bunnei <bunneidev@gmail.com> | 2020-04-17 03:12:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 03:12:33 +0200 |
commit | 79c1269f0fd25e8aaf090cd1f4640a52237a3fd3 (patch) | |
tree | cef3d04b0e14887bbcb6b021d42e2420ae1588a4 /src/core/hle/kernel/hle_ipc.cpp | |
parent | Merge pull request #3600 from ReinUsesLisp/no-pointer-buf-cache (diff) | |
parent | CMakeLists: Specify -Wextra on linux builds (diff) | |
download | yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.gz yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.bz2 yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.lz yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.xz yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.tar.zst yuzu-79c1269f0fd25e8aaf090cd1f4640a52237a3fd3.zip |
Diffstat (limited to 'src/core/hle/kernel/hle_ipc.cpp')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index c558a2f33..d65dae3ae 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -284,17 +284,17 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(Thread& thread) { std::vector<u8> HLERequestContext::ReadBuffer(int buffer_index) const { std::vector<u8> buffer; - const bool is_buffer_a{BufferDescriptorA().size() > buffer_index && + const bool is_buffer_a{BufferDescriptorA().size() > std::size_t(buffer_index) && BufferDescriptorA()[buffer_index].Size()}; auto& memory = Core::System::GetInstance().Memory(); if (is_buffer_a) { - ASSERT_MSG(BufferDescriptorA().size() > buffer_index, + ASSERT_MSG(BufferDescriptorA().size() > std::size_t(buffer_index), "BufferDescriptorA invalid buffer_index {}", buffer_index); buffer.resize(BufferDescriptorA()[buffer_index].Size()); memory.ReadBlock(BufferDescriptorA()[buffer_index].Address(), buffer.data(), buffer.size()); } else { - ASSERT_MSG(BufferDescriptorX().size() > buffer_index, + ASSERT_MSG(BufferDescriptorX().size() > std::size_t(buffer_index), "BufferDescriptorX invalid buffer_index {}", buffer_index); buffer.resize(BufferDescriptorX()[buffer_index].Size()); memory.ReadBlock(BufferDescriptorX()[buffer_index].Address(), buffer.data(), buffer.size()); @@ -310,7 +310,7 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size, return 0; } - const bool is_buffer_b{BufferDescriptorB().size() > buffer_index && + const bool is_buffer_b{BufferDescriptorB().size() > std::size_t(buffer_index) && BufferDescriptorB()[buffer_index].Size()}; const std::size_t buffer_size{GetWriteBufferSize(buffer_index)}; if (size > buffer_size) { @@ -321,13 +321,13 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size, auto& memory = Core::System::GetInstance().Memory(); if (is_buffer_b) { - ASSERT_MSG(BufferDescriptorB().size() > buffer_index, + ASSERT_MSG(BufferDescriptorB().size() > std::size_t(buffer_index), "BufferDescriptorB invalid buffer_index {}", buffer_index); ASSERT_MSG(BufferDescriptorB()[buffer_index].Size() >= size, "BufferDescriptorB buffer_index {} is not large enough", buffer_index); memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size); } else { - ASSERT_MSG(BufferDescriptorC().size() > buffer_index, + ASSERT_MSG(BufferDescriptorC().size() > std::size_t(buffer_index), "BufferDescriptorC invalid buffer_index {}", buffer_index); ASSERT_MSG(BufferDescriptorC()[buffer_index].Size() >= size, "BufferDescriptorC buffer_index {} is not large enough", buffer_index); @@ -338,16 +338,16 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size, } std::size_t HLERequestContext::GetReadBufferSize(int buffer_index) const { - const bool is_buffer_a{BufferDescriptorA().size() > buffer_index && + const bool is_buffer_a{BufferDescriptorA().size() > std::size_t(buffer_index) && BufferDescriptorA()[buffer_index].Size()}; if (is_buffer_a) { - ASSERT_MSG(BufferDescriptorA().size() > buffer_index, + ASSERT_MSG(BufferDescriptorA().size() > std::size_t(buffer_index), "BufferDescriptorA invalid buffer_index {}", buffer_index); ASSERT_MSG(BufferDescriptorA()[buffer_index].Size() > 0, "BufferDescriptorA buffer_index {} is empty", buffer_index); return BufferDescriptorA()[buffer_index].Size(); } else { - ASSERT_MSG(BufferDescriptorX().size() > buffer_index, + ASSERT_MSG(BufferDescriptorX().size() > std::size_t(buffer_index), "BufferDescriptorX invalid buffer_index {}", buffer_index); ASSERT_MSG(BufferDescriptorX()[buffer_index].Size() > 0, "BufferDescriptorX buffer_index {} is empty", buffer_index); @@ -356,14 +356,14 @@ std::size_t HLERequestContext::GetReadBufferSize(int buffer_index) const { } std::size_t HLERequestContext::GetWriteBufferSize(int buffer_index) const { - const bool is_buffer_b{BufferDescriptorB().size() > buffer_index && + const bool is_buffer_b{BufferDescriptorB().size() > std::size_t(buffer_index) && BufferDescriptorB()[buffer_index].Size()}; if (is_buffer_b) { - ASSERT_MSG(BufferDescriptorB().size() > buffer_index, + ASSERT_MSG(BufferDescriptorB().size() > std::size_t(buffer_index), "BufferDescriptorB invalid buffer_index {}", buffer_index); return BufferDescriptorB()[buffer_index].Size(); } else { - ASSERT_MSG(BufferDescriptorC().size() > buffer_index, + ASSERT_MSG(BufferDescriptorC().size() > std::size_t(buffer_index), "BufferDescriptorC invalid buffer_index {}", buffer_index); return BufferDescriptorC()[buffer_index].Size(); } |