mirror of https://github.com/SeanOMik/libki.git
etc: Fix build problems on CI
This commit is contained in:
parent
6249d6ee32
commit
44cb15d4d2
|
@ -42,7 +42,7 @@ namespace ki
|
||||||
void set_bit(int bit);
|
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();
|
~BitStream();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -143,7 +143,7 @@ namespace ki
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t *m_buffer;
|
uint8_t *m_buffer;
|
||||||
size_t m_buffer_size;
|
std::size_t m_buffer_size;
|
||||||
stream_pos m_position;
|
stream_pos m_position;
|
||||||
|
|
||||||
void expand_buffer();
|
void expand_buffer();
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "ki/util/BitStream.h"
|
#include "ki/util/BitStream.h"
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
namespace ki
|
namespace ki
|
||||||
{
|
{
|
||||||
|
@ -156,7 +157,7 @@ namespace ki
|
||||||
|
|
||||||
// Allocate a new buffer, copy everything over, and then delete the old buffer
|
// Allocate a new buffer, copy everything over, and then delete the old buffer
|
||||||
auto *new_buffer = new uint8_t[new_size] { 0 };
|
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;
|
delete[] m_buffer;
|
||||||
m_buffer = new_buffer;
|
m_buffer = new_buffer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue