mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Drop redundant ifs.
This commit is contained in:
parent
f2264ebb3e
commit
f669f02407
@ -77,8 +77,7 @@ void fifo_write(fifo_buffer_t *buffer, const void *in_buf, size_t size)
|
||||
}
|
||||
|
||||
memcpy(buffer->buffer + buffer->end, in_buf, first_write);
|
||||
if (rest_write > 0)
|
||||
memcpy(buffer->buffer, (const uint8_t*)in_buf + first_write, rest_write);
|
||||
memcpy(buffer->buffer, (const uint8_t*)in_buf + first_write, rest_write);
|
||||
|
||||
buffer->end = (buffer->end + size) % buffer->bufsize;
|
||||
}
|
||||
@ -95,8 +94,7 @@ void fifo_read(fifo_buffer_t *buffer, void *in_buf, size_t size)
|
||||
}
|
||||
|
||||
memcpy(in_buf, (const uint8_t*)buffer->buffer + buffer->first, first_read);
|
||||
if (rest_read > 0)
|
||||
memcpy((uint8_t*)in_buf + first_read, buffer->buffer, rest_read);
|
||||
memcpy((uint8_t*)in_buf + first_read, buffer->buffer, rest_read);
|
||||
|
||||
buffer->first = (buffer->first + size) % buffer->bufsize;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user