From 5ac3e5c95890c60765fa4ee4e40e7a2ac2dc4768 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Sun, 12 Mar 2023 18:31:38 -0400 Subject: [PATCH 1/2] Update `tomlplusplus` library Fix build on MinGW g++ 10 Signed-off-by: Kenneth Chew --- libraries/tomlplusplus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/tomlplusplus b/libraries/tomlplusplus index 0a90913ab..7eb2ffcc0 160000 --- a/libraries/tomlplusplus +++ b/libraries/tomlplusplus @@ -1 +1 @@ -Subproject commit 0a90913abf9390b9e08ab6d3b40ac11634553f38 +Subproject commit 7eb2ffcc09f8e9890dc0b77ff8ab00fc53b1f2b8 From 430369feb8712b314b0c31deef43435fe94a4f45 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Sun, 12 Mar 2023 18:32:42 -0400 Subject: [PATCH 2/2] fix: explicit conversion to C string to fix MinGW g++ 10 build Signed-off-by: Kenneth Chew --- launcher/modplatform/helpers/HashUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/modplatform/helpers/HashUtils.cpp b/launcher/modplatform/helpers/HashUtils.cpp index 2177ddadc..81c94e1b5 100644 --- a/launcher/modplatform/helpers/HashUtils.cpp +++ b/launcher/modplatform/helpers/HashUtils.cpp @@ -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));