aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-11-07 14:04:48 -0300
committerflow <flowlnlnln@gmail.com>2022-11-07 14:04:48 -0300
commit589d160515b7b9185bd09fc4aff5ae2c4abb4243 (patch)
tree1c051bc8324a5f00fd325b952cd9bc897c0a0a4a /launcher
parent9f462dcc27a614fc9098184137dfad443958b883 (diff)
downloadPrismLauncher-589d160515b7b9185bd09fc4aff5ae2c4abb4243.tar.gz
PrismLauncher-589d160515b7b9185bd09fc4aff5ae2c4abb4243.tar.bz2
PrismLauncher-589d160515b7b9185bd09fc4aff5ae2c4abb4243.zip
fix: use cross-platform toStdString in FlameHasher
Almost the same issue from toml++ :p Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/modplatform/helpers/HashUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/launcher/modplatform/helpers/HashUtils.cpp b/launcher/modplatform/helpers/HashUtils.cpp
index a7bbaba5..b18c87af 100644
--- a/launcher/modplatform/helpers/HashUtils.cpp
+++ b/launcher/modplatform/helpers/HashUtils.cpp
@@ -4,6 +4,7 @@
#include <QFile>
#include "FileSystem.h"
+#include "StringUtils.h"
#include <MurmurHash2.h>
@@ -66,7 +67,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(m_path.toStdString(), std::ifstream::binary);
+ std::ifstream file_stream(StringUtils::toStdString(m_path), 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));