diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-05-27 10:28:45 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-05-27 10:40:38 -0400 |
| commit | bf6948c1d42ddd7487c41d63d02c10052aaac054 (patch) | |
| tree | a5db514548aab89662a08d59f2382da0ba0ad9eb /Source/Core/DiscIO/VolumeVerifier.cpp | |
| parent | fa57396e97302b25204d29dbef132a88cef45c80 (diff) | |
DiscIO/VolumeVerifier: Use structured bindings where applicable
Allows providing better names than "first" or "second".
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 5b2b549e6a..e7d325d918 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -816,26 +816,26 @@ void VolumeVerifier::Finish() } } - for (auto pair : m_block_errors) + for (auto [partition, blocks] : m_block_errors) { - if (pair.second > 0) + if (blocks > 0) { - const std::string name = GetPartitionName(m_volume.GetPartitionType(pair.first)); + const std::string name = GetPartitionName(m_volume.GetPartitionType(partition)); std::string text = StringFromFormat( - GetStringT("Errors were found in %zu blocks in the %s partition.").c_str(), pair.second, + GetStringT("Errors were found in %zu blocks in the %s partition.").c_str(), blocks, name.c_str()); AddProblem(Severity::Medium, std::move(text)); } } - for (auto pair : m_unused_block_errors) + for (auto [partition, blocks] : m_unused_block_errors) { - if (pair.second > 0) + if (blocks > 0) { - const std::string name = GetPartitionName(m_volume.GetPartitionType(pair.first)); + const std::string name = GetPartitionName(m_volume.GetPartitionType(partition)); std::string text = StringFromFormat( - GetStringT("Errors were found in %zu unused blocks in the %s partition.").c_str(), - pair.second, name.c_str()); + GetStringT("Errors were found in %zu unused blocks in the %s partition.").c_str(), blocks, + name.c_str()); AddProblem(Severity::Low, std::move(text)); } } |
