From 7f84bdf8fd5c93286f000bc5f9314eab81128cee Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Sun, 21 Jan 2024 19:34:19 +0000 Subject: Address C4267 compiler warnings (#647) Implicit conversion from `size_t` to a smaller type --- primedev/core/math/bitbuf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'primedev/core/math') diff --git a/primedev/core/math/bitbuf.h b/primedev/core/math/bitbuf.h index 5ca75455..a06dab17 100644 --- a/primedev/core/math/bitbuf.h +++ b/primedev/core/math/bitbuf.h @@ -630,7 +630,7 @@ public: // at the head to make reading and detecting the end efficient. int nHead = m_DataBytes & 3; - int posBytes = startPos / 8; + size_t posBytes = startPos / 8; if ((m_DataBytes < 4) || (nHead && (posBytes < nHead))) { // partial first dword @@ -652,7 +652,7 @@ public: } else { - int adjustedPos = startPos - (nHead << 3); + size_t adjustedPos = startPos - (nHead << 3); m_DataIn = reinterpret_cast(reinterpret_cast(m_Data) + ((adjustedPos / 32) << 2) + nHead); -- cgit v1.2.3