IORequest::_CopyData(): Small optimization

If we're running in the context of the user team the I/O buffer belongs
to, we can use _CopySimple() as well.
This commit is contained in:
Ingo Weinhold
2013-11-11 22:27:53 +01:00
parent 07f6506eb6
commit 426fe7db1d
@@ -1173,7 +1173,7 @@ IORequest::_CopyData(void* _buffer, off_t offset, size_t size, bool copyIn)
if (fBuffer->IsPhysical()) {
copyFunction = &IORequest::_CopyPhysical;
} else {
copyFunction = fBuffer->IsUser()
copyFunction = fBuffer->IsUser() && fTeam != team_get_current_team_id()
? &IORequest::_CopyUser : &IORequest::_CopySimple;
}