summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/chdcodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/chdcodec.cpp')
-rw-r--r--src/lib/util/chdcodec.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp
index 026393b60a2..3f76af302bd 100644
--- a/src/lib/util/chdcodec.cpp
+++ b/src/lib/util/chdcodec.cpp
@@ -751,7 +751,7 @@ void chd_zlib_allocator::install(z_stream &stream)
voidpf chd_zlib_allocator::fast_alloc(voidpf opaque, uInt items, uInt size)
{
- chd_zlib_allocator *codec = reinterpret_cast<chd_zlib_allocator *>(opaque);
+ auto *codec = reinterpret_cast<chd_zlib_allocator *>(opaque);
// compute the size, rounding to the nearest 1k
size = (size * items + 0x3ff) & ~0x3ff;
@@ -769,7 +769,7 @@ voidpf chd_zlib_allocator::fast_alloc(voidpf opaque, uInt items, uInt size)
}
// alloc a new one and put it into the list
- uint32_t *ptr = reinterpret_cast<uint32_t *>(new uint8_t[size + sizeof(uint32_t)]);
+ auto *ptr = reinterpret_cast<uint32_t *>(new uint8_t[size + sizeof(uint32_t)]);
for (int scan = 0; scan < MAX_ZLIB_ALLOCS; scan++)
if (codec->m_allocptr[scan] == nullptr)
{
@@ -790,7 +790,7 @@ voidpf chd_zlib_allocator::fast_alloc(voidpf opaque, uInt items, uInt size)
void chd_zlib_allocator::fast_free(voidpf opaque, voidpf address)
{
- chd_zlib_allocator *codec = reinterpret_cast<chd_zlib_allocator *>(opaque);
+ auto *codec = reinterpret_cast<chd_zlib_allocator *>(opaque);
// find the hunk
uint32_t *ptr = reinterpret_cast<uint32_t *>(address) - 1;
@@ -971,7 +971,7 @@ chd_lzma_allocator::~chd_lzma_allocator()
void *chd_lzma_allocator::fast_alloc(void *p, size_t size)
{
- chd_lzma_allocator *codec = reinterpret_cast<chd_lzma_allocator *>(p);
+ auto *codec = reinterpret_cast<chd_lzma_allocator *>(p);
// compute the size, rounding to the nearest 1k
size = (size + 0x3ff) & ~0x3ff;
@@ -989,7 +989,7 @@ void *chd_lzma_allocator::fast_alloc(void *p, size_t size)
}
// alloc a new one and put it into the list
- uint32_t *ptr = reinterpret_cast<uint32_t *>(new uint8_t[size + sizeof(uint32_t)]);
+ auto *ptr = reinterpret_cast<uint32_t *>(new uint8_t[size + sizeof(uint32_t)]);
for (int scan = 0; scan < MAX_LZMA_ALLOCS; scan++)
if (codec->m_allocptr[scan] == nullptr)
{
@@ -1013,7 +1013,7 @@ void chd_lzma_allocator::fast_free(void *p, void *address)
if (address == nullptr)
return;
- chd_lzma_allocator *codec = reinterpret_cast<chd_lzma_allocator *>(p);
+ auto *codec = reinterpret_cast<chd_lzma_allocator *>(p);
// find the hunk
uint32_t *ptr = reinterpret_cast<uint32_t *>(address) - 1;