use const references

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-11-11 15:51:43 -08:00
parent a8c77a6fba
commit 837fc98638

View File

@ -83,8 +83,8 @@ audiofile_file_read(AFvirtualfile *vfile, void *data, size_t length) noexcept
static AFfileoffset
audiofile_file_length(AFvirtualfile *vfile) noexcept
{
AudioFileInputStream &afis = *(AudioFileInputStream *)vfile->closure;
InputStream &is = afis.is;
const AudioFileInputStream &afis = *(AudioFileInputStream *)vfile->closure;
const InputStream &is = afis.is;
return is.GetSize();
}
@ -92,8 +92,8 @@ audiofile_file_length(AFvirtualfile *vfile) noexcept
static AFfileoffset
audiofile_file_tell(AFvirtualfile *vfile) noexcept
{
AudioFileInputStream &afis = *(AudioFileInputStream *)vfile->closure;
InputStream &is = afis.is;
const AudioFileInputStream &afis = *(AudioFileInputStream *)vfile->closure;
const InputStream &is = afis.is;
return is.GetOffset();
}