etc: Fix build problems on CI

This commit is contained in:
Joshua Scott 2018-10-20 01:21:06 +01:00
parent 6249d6ee32
commit 44cb15d4d2
2 changed files with 4 additions and 3 deletions

View File

@ -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();

View File

@ -1,6 +1,7 @@
#include "ki/util/BitStream.h"
#include <limits>
#include <exception>
#include <cstring>
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;
}