Skip to content
Permalink
Browse files

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).
  • Loading branch information...
lioncash committed May 27, 2019
1 parent 52eb2d0 commit fa57396e97302b25204d29dbef132a88cef45c80
Showing with 11 additions and 11 deletions.
  1. +1 −1 Source/Core/DiscIO/VolumeVerifier.cpp
  2. +10 −10 Source/Core/DiscIO/VolumeVerifier.h
@@ -50,7 +50,7 @@ VolumeVerifier::VolumeVerifier(const Volume& volume, Hashes<bool> 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())
{
}

@@ -109,13 +109,13 @@ class VolumeVerifier final

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<bool> m_hashes_to_calculate;
bool m_calculating_any_hash;
unsigned long m_crc32_context;
Hashes<bool> 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 @@ class VolumeVerifier final
std::map<Partition, size_t> m_block_errors;
std::map<Partition, size_t> 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

0 comments on commit fa57396

Please sign in to comment.
You can’t perform that action at this time.