forked from 0ad/0ad
small optimization: rounds offset down (and restores later) to avoid buffer copy in waio
This was SVN commit r881.
This commit is contained in:
parent
3e92b4a043
commit
4c3f1027dd
@ -680,6 +680,11 @@ debug_out("file_wait_io: hio=%I64x\n", hio);
|
||||
|
||||
p = (void*)cb->aio_buf; // cast from volatile void*
|
||||
size = io->user_size;
|
||||
|
||||
// padding optimization: we rounded the start offset down
|
||||
// to avoid a buffer memcpy in waio. skip past that
|
||||
(char*&)p += io->padding;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user