VolumeVerifier: Handle overlapping blocks more efficiently

The performance gains of doing this aren't too important since you
normally wouldn't run into any disc image that has overlapping blocks
(which by extension means overlapping partitions), but this change also
lets us get rid of things like VolumeVerifier's mutex that used to
exist just for the sake of handling overlapping blocks.
This commit is contained in:
JosJuice
2019-08-06 21:14:33 +02:00
parent 15ebb1d9e4
commit 10e1acf25c
2 changed files with 64 additions and 63 deletions

View File

@ -6,7 +6,6 @@
#include <future>
#include <map>
#include <mutex>
#include <optional>
#include <string>
#include <vector>
@ -177,8 +176,8 @@ private:
mbedtls_md5_context m_md5_context;
mbedtls_sha1_context m_sha1_context;
u64 m_excess_bytes = 0;
std::vector<u8> m_data;
std::mutex m_volume_mutex;
std::future<void> m_crc32_future;
std::future<void> m_md5_future;
std::future<void> m_sha1_future;