diff options
author | 2020-01-31 03:46:27 +0100 | |
---|---|---|
committer | 2020-01-30 21:46:27 -0500 | |
commit | dfaf9dd5bcf354f09fde7573b7042bb63d84fad0 (patch) | |
tree | d018f200f2077123b6e0971499b1de213577ded4 /src/lib/util/chd.cpp | |
parent | 4a102057779ece1b11431ff0b7787249ce0ad3ad (diff) |
fixed some modernize-use-auto clang-tidy warnings (nw) (#6238)
Diffstat (limited to 'src/lib/util/chd.cpp')
-rw-r--r-- | src/lib/util/chd.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp index 274c6a37aab..daad423147a 100644 --- a/src/lib/util/chd.cpp +++ b/src/lib/util/chd.cpp @@ -888,7 +888,7 @@ chd_error chd_file::read_hunk(uint32_t hunknum, void *buffer) uint32_t blocklen; util::crc32_t blockcrc; uint8_t *rawmap; - uint8_t *dest = reinterpret_cast<uint8_t *>(buffer); + auto *dest = reinterpret_cast<uint8_t *>(buffer); switch (m_version) { // v3/v4 map entries @@ -1045,7 +1045,7 @@ chd_error chd_file::write_hunk(uint32_t hunknum, const void *buffer) { // first make sure we need to allocate it bool all_zeros = true; - const uint32_t *scan = reinterpret_cast<const uint32_t *>(buffer); + const auto *scan = reinterpret_cast<const uint32_t *>(buffer); for (uint32_t index = 0; index < m_hunkbytes / 4; index++) if (scan[index] != 0) { @@ -1140,7 +1140,7 @@ chd_error chd_file::read_bytes(uint64_t offset, void *buffer, uint32_t bytes) // iterate over hunks uint32_t first_hunk = offset / m_hunkbytes; uint32_t last_hunk = (offset + bytes - 1) / m_hunkbytes; - uint8_t *dest = reinterpret_cast<uint8_t *>(buffer); + auto *dest = reinterpret_cast<uint8_t *>(buffer); for (uint32_t curhunk = first_hunk; curhunk <= last_hunk; curhunk++) { // determine start/end boundaries @@ -1193,7 +1193,7 @@ chd_error chd_file::write_bytes(uint64_t offset, const void *buffer, uint32_t by // iterate over hunks uint32_t first_hunk = offset / m_hunkbytes; uint32_t last_hunk = (offset + bytes - 1) / m_hunkbytes; - const uint8_t *source = reinterpret_cast<const uint8_t *>(buffer); + const auto *source = reinterpret_cast<const uint8_t *>(buffer); for (uint32_t curhunk = first_hunk; curhunk <= last_hunk; curhunk++) { // determine start/end boundaries @@ -3010,7 +3010,7 @@ chd_error chd_file_compressor::compress_continue(double &progress, double &ratio void *chd_file_compressor::async_walk_parent_static(void *param, int threadid) { - work_item *item = reinterpret_cast<work_item *>(param); + auto *item = reinterpret_cast<work_item *>(param); item->m_compressor->async_walk_parent(*item); return nullptr; } @@ -3052,7 +3052,7 @@ void chd_file_compressor::async_walk_parent(work_item &item) void *chd_file_compressor::async_compress_hunk_static(void *param, int threadid) { - work_item *item = reinterpret_cast<work_item *>(param); + auto *item = reinterpret_cast<work_item *>(param); item->m_compressor->async_compress_hunk(*item, threadid); return nullptr; } |