input/CdioParanoia: add `const` to pointer
This commit is contained in:
parent
10a6c5c57d
commit
c7848da8f2
|
@ -293,7 +293,7 @@ CdioParanoiaInputStream::Read(void *ptr, size_t length)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//current sector was changed ?
|
//current sector was changed ?
|
||||||
int16_t *rbuf;
|
const int16_t *rbuf;
|
||||||
if (lsn_relofs != buffer_lsn) {
|
if (lsn_relofs != buffer_lsn) {
|
||||||
const ScopeUnlock unlock(mutex);
|
const ScopeUnlock unlock(mutex);
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ CdioParanoiaInputStream::Read(void *ptr, size_t length)
|
||||||
buffer_lsn = lsn_relofs;
|
buffer_lsn = lsn_relofs;
|
||||||
} else {
|
} else {
|
||||||
//use cached sector
|
//use cached sector
|
||||||
rbuf = (int16_t *)buffer;
|
rbuf = (const int16_t *)buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
//correct offset
|
//correct offset
|
||||||
|
@ -329,7 +329,7 @@ CdioParanoiaInputStream::Read(void *ptr, size_t length)
|
||||||
const size_t len = (length < maxwrite? length : maxwrite);
|
const size_t len = (length < maxwrite? length : maxwrite);
|
||||||
|
|
||||||
//skip diff bytes from this lsn
|
//skip diff bytes from this lsn
|
||||||
memcpy(wptr, ((char*)rbuf) + diff, len);
|
memcpy(wptr, ((const char *)rbuf) + diff, len);
|
||||||
//update pointer
|
//update pointer
|
||||||
wptr += len;
|
wptr += len;
|
||||||
nbytes += len;
|
nbytes += len;
|
||||||
|
|
Loading…
Reference in New Issue