From fa57396e97302b25204d29dbef132a88cef45c80 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 27 May 2019 10:23:52 -0400 Subject: [PATCH] DiscIO/VolumeVerifier: In-class initialize members where applicable Removes redundant initializers from the constructor and provides initializers for all members that don't already have one for consistency (and deterministic initial state). --- Source/Core/DiscIO/VolumeVerifier.cpp | 2 +- Source/Core/DiscIO/VolumeVerifier.h | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 653cbbaf9c..5b2b549e6a 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -50,7 +50,7 @@ VolumeVerifier::VolumeVerifier(const Volume& volume, Hashes hashes_to_calc : m_volume(volume), m_hashes_to_calculate(hashes_to_calculate), m_calculating_any_hash(hashes_to_calculate.crc32 || hashes_to_calculate.md5 || hashes_to_calculate.sha1), - m_started(false), m_done(false), m_progress(0), m_max_progress(volume.GetSize()) + m_max_progress(volume.GetSize()) { } diff --git a/Source/Core/DiscIO/VolumeVerifier.h b/Source/Core/DiscIO/VolumeVerifier.h index 4c2be055d1..f302891431 100644 --- a/Source/Core/DiscIO/VolumeVerifier.h +++ b/Source/Core/DiscIO/VolumeVerifier.h @@ -109,13 +109,13 @@ private: const Volume& m_volume; Result m_result; - bool m_is_tgc; - bool m_is_datel; - bool m_is_not_retail; + bool m_is_tgc = false; + bool m_is_datel = false; + bool m_is_not_retail = false; - Hashes m_hashes_to_calculate; - bool m_calculating_any_hash; - unsigned long m_crc32_context; + Hashes m_hashes_to_calculate{}; + bool m_calculating_any_hash = false; + unsigned long m_crc32_context = 0; mbedtls_md5_context m_md5_context; mbedtls_sha1_context m_sha1_context; @@ -127,10 +127,10 @@ private: std::map m_block_errors; std::map m_unused_block_errors; - bool m_started; - bool m_done; - u64 m_progress; - u64 m_max_progress; + bool m_started = false; + bool m_done = false; + u64 m_progress = 0; + u64 m_max_progress = 0; }; } // namespace DiscIO