diff options
author | Max Kellermann <max@duempel.org> | 2013-11-24 22:47:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-11-24 22:47:50 +0100 |
commit | c95d068ef5311d9a6240bd39740fef5f7ab4c64a (patch) | |
tree | ecd0d43ebc1645b4651003286bc0d522e577ec4d /src/archive | |
parent | dbda35ffe178da0b012a52368367c7dbf1811540 (diff) | |
download | mpd-c95d068ef5311d9a6240bd39740fef5f7ab4c64a.tar.gz mpd-c95d068ef5311d9a6240bd39740fef5f7ab4c64a.tar.xz mpd-c95d068ef5311d9a6240bd39740fef5f7ab4c64a.zip |
archive/iso9660: use reference instead of pointer
Diffstat (limited to 'src/archive')
-rw-r--r-- | src/archive/Iso9660ArchivePlugin.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/archive/Iso9660ArchivePlugin.cxx b/src/archive/Iso9660ArchivePlugin.cxx index 2d0105a59..45a9b134b 100644 --- a/src/archive/Iso9660ArchivePlugin.cxx +++ b/src/archive/Iso9660ArchivePlugin.cxx @@ -142,7 +142,7 @@ Iso9660ArchiveFile::Visit(ArchiveVisitor &visitor) class Iso9660InputStream { InputStream base; - Iso9660ArchiveFile *archive; + Iso9660ArchiveFile &archive; iso9660_stat_t *statbuf; @@ -151,16 +151,16 @@ public: Mutex &mutex, Cond &cond, iso9660_stat_t *_statbuf) :base(iso9660_input_plugin, uri, mutex, cond), - archive(&_archive), statbuf(_statbuf) { + archive(_archive), statbuf(_statbuf) { base.ready = true; base.size = statbuf->size; - archive->Ref(); + archive.Ref(); } ~Iso9660InputStream() { free(statbuf); - archive->Unref(); + archive.Unref(); } InputStream *Get() { @@ -216,8 +216,8 @@ Iso9660InputStream::Read(void *ptr, size_t size, Error &error) cur_block = base.offset / ISO_BLOCKSIZE; - readed = archive->SeekRead(ptr, statbuf->lsn + cur_block, - no_blocks); + readed = archive.SeekRead(ptr, statbuf->lsn + cur_block, + no_blocks); if (readed != no_blocks * ISO_BLOCKSIZE) { error.Format(iso9660_domain, |