changed a lot of small clang-tidy warnings
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
// NOTE: I added this file
|
||||
|
||||
void ScrollbackBuffer::put(CGA::cga_line_t* line) {
|
||||
CGA::cga_line_t* destination = (CGA::cga_line_t*)this->buffer + this->pos;
|
||||
CGA::cga_line_t* destination = (CGA::cga_line_t*)this->buffer.get() + this->pos;
|
||||
mmem::memcpy<CGA::cga_line_t>(destination, line);
|
||||
|
||||
this->pos = (this->pos + 1) % this->rows;
|
||||
@ -21,13 +21,13 @@ void ScrollbackBuffer::get(CGA::cga_line_t* destination, unsigned char page) con
|
||||
unsigned int wrapline;
|
||||
for (unsigned int line = 0; line < (this->rows / this->pages); ++line) {
|
||||
wrapline = (this->pos + rpage * (this->rows / this->pages) + line) % this->rows;
|
||||
mmem::memcpy<CGA::cga_line_t>(destination + line, (CGA::cga_line_t*)this->buffer + wrapline);
|
||||
mmem::memcpy<CGA::cga_line_t>(destination + line, (CGA::cga_line_t*)this->buffer.get() + wrapline);
|
||||
}
|
||||
}
|
||||
|
||||
void ScrollbackBuffer::clear() {
|
||||
for (unsigned char page = 0; page < this->pages; ++page) {
|
||||
mmem::zero<CGA::cga_page_t>(this->buffer + page);
|
||||
mmem::zero<CGA::cga_page_t>(this->buffer.get() + page);
|
||||
}
|
||||
this->pos = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user