hle_ipc: Remove std::size_t casts where applicable

These were added in the change that enabled -Wextra on linux builds so
as not to introduce interface changes in the same change as a
build-system flag addition.

Now that the flags are enabled, we can freely change the interface to
make these unnecessary.
This commit is contained in:
Lioncash
2020-04-16 22:02:08 -04:00
parent 79c1269f0f
commit 77356731a9
2 changed files with 23 additions and 21 deletions

View File

@ -179,10 +179,11 @@ public:
}
/// Helper function to read a buffer using the appropriate buffer descriptor
std::vector<u8> ReadBuffer(int buffer_index = 0) const;
std::vector<u8> ReadBuffer(std::size_t buffer_index = 0) const;
/// Helper function to write a buffer using the appropriate buffer descriptor
std::size_t WriteBuffer(const void* buffer, std::size_t size, int buffer_index = 0) const;
std::size_t WriteBuffer(const void* buffer, std::size_t size,
std::size_t buffer_index = 0) const;
/* Helper function to write a buffer using the appropriate buffer descriptor
*
@ -194,7 +195,8 @@ public:
*/
template <typename ContiguousContainer,
typename = std::enable_if_t<!std::is_pointer_v<ContiguousContainer>>>
std::size_t WriteBuffer(const ContiguousContainer& container, int buffer_index = 0) const {
std::size_t WriteBuffer(const ContiguousContainer& container,
std::size_t buffer_index = 0) const {
using ContiguousType = typename ContiguousContainer::value_type;
static_assert(std::is_trivially_copyable_v<ContiguousType>,
@ -205,10 +207,10 @@ public:
}
/// Helper function to get the size of the input buffer
std::size_t GetReadBufferSize(int buffer_index = 0) const;
std::size_t GetReadBufferSize(std::size_t buffer_index = 0) const;
/// Helper function to get the size of the output buffer
std::size_t GetWriteBufferSize(int buffer_index = 0) const;
std::size_t GetWriteBufferSize(std::size_t buffer_index = 0) const;
template <typename T>
std::shared_ptr<T> GetCopyObject(std::size_t index) {