From 44cb15d4d2c97b37baad47244075699dea0aacd9 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Sat, 20 Oct 2018 01:21:06 +0100 Subject: [PATCH] etc: Fix build problems on CI --- include/ki/util/BitStream.h | 4 ++-- src/util/BitStream.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/ki/util/BitStream.h b/include/ki/util/BitStream.h index f50bf8e..1f537ab 100644 --- a/include/ki/util/BitStream.h +++ b/include/ki/util/BitStream.h @@ -42,7 +42,7 @@ namespace ki void set_bit(int bit); }; - explicit BitStream(size_t buffer_size = KI_BITSTREAM_DEFAULT_BUFFER_SIZE); + explicit BitStream(std::size_t buffer_size = KI_BITSTREAM_DEFAULT_BUFFER_SIZE); ~BitStream(); /** @@ -143,7 +143,7 @@ namespace ki private: uint8_t *m_buffer; - size_t m_buffer_size; + std::size_t m_buffer_size; stream_pos m_position; void expand_buffer(); diff --git a/src/util/BitStream.cpp b/src/util/BitStream.cpp index b9308f8..b796295 100644 --- a/src/util/BitStream.cpp +++ b/src/util/BitStream.cpp @@ -1,6 +1,7 @@ #include "ki/util/BitStream.h" #include #include +#include namespace ki { @@ -156,7 +157,7 @@ namespace ki // Allocate a new buffer, copy everything over, and then delete the old buffer auto *new_buffer = new uint8_t[new_size] { 0 }; - memcpy(new_buffer, m_buffer, m_buffer_size); + std::memcpy(new_buffer, m_buffer, m_buffer_size); delete[] m_buffer; m_buffer = new_buffer; }