Progress on mingw driver

This commit is contained in:
2021-10-07 14:58:20 -04:00
parent bce756d1fd
commit e7f55a2411
16 changed files with 405 additions and 172 deletions

View File

@@ -166,6 +166,9 @@ void StreamBuffer::write_bytes(const char *s, int64_t len) {
write_cursor_ += len;
}
void StreamBuffer::write_bytes(const std::string &s) {
write_bytes(s.c_str(), s.size());
}
const char *StreamBuffer::read_bytes(int64_t bytes) {
check_available(bytes);
@@ -395,11 +398,11 @@ void StreamBuffer::overwrite_uint64(int64_t write_count_after, uint64_t vv) {
memcpy(target, &v, 8);
}
bool StreamBuffer::at_eof() {
bool StreamBuffer::empty() {
return (read_cursor_ == write_cursor_);
}
void StreamBuffer::verify_eof() {
void StreamBuffer::verify_empty() {
if (read_cursor_ != write_cursor_) {
throw StreamCorruption();
}