diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-01-04 19:53:31 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-01-04 19:53:31 -0500 |
| commit | b1a2dec78af6e2bc99ebbc8c0ade50dbf8ac6f0e (patch) | |
| tree | bd52333445c9e28ac28d37a9712a53a24df6a94a /Source/Core/DiscIO/DiscScrubber.cpp | |
| parent | 0eaeca9d6d680b3392fb32b984ca28abf74aa8cb (diff) | |
DiscScrubber: Convert a #define into a typed constant
Diffstat (limited to 'Source/Core/DiscIO/DiscScrubber.cpp')
| -rw-r--r-- | Source/Core/DiscIO/DiscScrubber.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/DiscScrubber.cpp b/Source/Core/DiscIO/DiscScrubber.cpp index 2f7ab75f78..f3f8c6075f 100644 --- a/Source/Core/DiscIO/DiscScrubber.cpp +++ b/Source/Core/DiscIO/DiscScrubber.cpp @@ -20,7 +20,7 @@ namespace DiscIO { -#define CLUSTER_SIZE 0x8000 +constexpr size_t CLUSTER_SIZE = 0x8000; DiscScrubber::DiscScrubber() = default; DiscScrubber::~DiscScrubber() = default; @@ -43,17 +43,17 @@ bool DiscScrubber::SetupScrub(const std::string& filename, int block_size) m_file_size = m_disc->GetSize(); - u32 numClusters = (u32)(m_file_size / CLUSTER_SIZE); + const size_t num_clusters = static_cast<size_t>(m_file_size / CLUSTER_SIZE); // Warn if not DVD5 or DVD9 size - if (numClusters != 0x23048 && numClusters != 0x46090) + if (num_clusters != 0x23048 && num_clusters != 0x46090) { - WARN_LOG(DISCIO, "%s is not a standard sized Wii disc! (%x blocks)", filename.c_str(), - numClusters); + WARN_LOG(DISCIO, "%s is not a standard sized Wii disc! (%zx blocks)", filename.c_str(), + num_clusters); } // Table of free blocks - m_free_table.resize(numClusters, 1); + m_free_table.resize(num_clusters, 1); // Fill out table of free blocks const bool success = ParseDisc(); |
