Skip to content

Commit

Permalink
[Base] Added ReadOnly BitStream
Browse files Browse the repository at this point in the history
  • Loading branch information
Gliniak committed Jun 2, 2023
1 parent 7c21610 commit 15176dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/xenia/base/bit_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ namespace xe {
BitStream::BitStream(uint8_t* buffer, size_t size_in_bits)
: buffer_(buffer), size_bits_(size_in_bits) {}

BitStream::BitStream(const uint8_t* buffer, size_t size_in_bits)
: buffer_(const_cast<uint8_t*>(buffer)), size_bits_(size_in_bits) {}

BitStream::~BitStream() = default;

void BitStream::SetOffset(size_t offset_bits) {
Expand Down
1 change: 1 addition & 0 deletions src/xenia/base/bit_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace xe {
class BitStream {
public:
BitStream(uint8_t* buffer, size_t size_in_bits);
BitStream(const uint8_t* buffer, size_t size_in_bits);
~BitStream();

const uint8_t* buffer() const { return buffer_; }
Expand Down

0 comments on commit 15176dd

Please sign in to comment.