From fa82d1cca1544c401bc06c341ce265a346a498b9 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sat, 25 May 2024 13:14:46 +0200 Subject: Switch from fmtlib to std::format. (#2031) * Switch from fmtlib to std::format. * Remove libffi from dependencies in Github action. --- src/shared/directoryentry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/directoryentry.cpp') diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp index 84da66e2..5468beea 100644 --- a/src/shared/directoryentry.cpp +++ b/src/shared/directoryentry.cpp @@ -414,7 +414,7 @@ const FileEntryPtr DirectoryEntry::searchFile(const std::wstring& path, if (temp != nullptr) { if (len >= path.size()) { - log::error(QObject::tr("unexpected end of path").toStdString()); + log::error("{}", QObject::tr("unexpected end of path")); return FileEntryPtr(); } @@ -905,7 +905,7 @@ void DirectoryEntry::dump(const std::wstring& file) const auto e = _wfopen_s(&f, file.c_str(), L"wb"); if (e != 0 || !f) { - throw DumpFailed(fmt::format("failed to open, {} ({})", std::strerror(e), e)); + throw DumpFailed(std::format("failed to open, {} ({})", std::strerror(e), e)); } Guard g([&] { @@ -943,7 +943,7 @@ void DirectoryEntry::dump(std::FILE* f, const std::wstring& parentPath) const if (std::fwrite(lineu8.data(), lineu8.size(), 1, f) != 1) { const auto e = errno; - throw DumpFailed(fmt::format("failed to write, {} ({})", std::strerror(e), e)); + throw DumpFailed(std::format("failed to write, {} ({})", std::strerror(e), e)); } } } -- cgit v1.3.1