Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
This commit is contained in:
parent
7dfba3cda9
commit
bc2e8d99e5
62 changed files with 148 additions and 147 deletions
|
|
@ -147,7 +147,7 @@ void FileAccessNetworkClient::_thread_func() {
|
|||
|
||||
Vector<uint8_t> block;
|
||||
block.resize(len);
|
||||
client->get_data(block.ptr(), len);
|
||||
client->get_data(block.ptrw(), len);
|
||||
|
||||
if (fa) //may have been queued
|
||||
fa->_set_block(offset, block);
|
||||
|
|
@ -434,12 +434,12 @@ int FileAccessNetwork::get_buffer(uint8_t *p_dst, int p_length) const {
|
|||
|
||||
_queue_page(page + j);
|
||||
}
|
||||
buff = pages[page].buffer.ptr();
|
||||
buff = pages[page].buffer.ptrw();
|
||||
//queue pages
|
||||
buffer_mutex->unlock();
|
||||
}
|
||||
|
||||
buff = pages[page].buffer.ptr();
|
||||
buff = pages[page].buffer.ptrw();
|
||||
last_page_buff = buff;
|
||||
last_page = page;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue