fix: explicit conversion to C string to fix MinGW g++ 10 build

Signed-off-by: Kenneth Chew <kenneth.c0@protonmail.com>
This commit is contained in:
Kenneth Chew 2023-03-12 18:32:42 -04:00
parent 5ac3e5c958
commit 430369feb8
No known key found for this signature in database
GPG Key ID: F17D3E14A07739DA

View File

@ -79,7 +79,7 @@ void FlameHasher::executeTask()
// CF-specific
auto should_filter_out = [](char c) { return (c == 9 || c == 10 || c == 13 || c == 32); };
std::ifstream file_stream(StringUtils::toStdString(m_path), std::ifstream::binary);
std::ifstream file_stream(StringUtils::toStdString(m_path).c_str(), std::ifstream::binary);
// TODO: This is very heavy work, but apparently QtConcurrent can't use move semantics, so we can't boop this to another thread.
// How do we make this non-blocking then?
m_hash = QString::number(MurmurHash2(std::move(file_stream), 4 * MiB, should_filter_out));