From 63a8ab2683958631cf579de2570e60372bf49191 Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 16 Aug 2022 16:26:17 +0200 Subject: [PATCH] pass c strings to fmt boost strings and filesystem paths used to be automatically converted, but that doesn't happen anymore with fmt 9 --- src/output.cpp | 2 +- src/search.cpp | 4 ++-- src/zip.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/output.cpp b/src/output.cpp index a4b2f2e..288bfcc 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -44,7 +44,7 @@ void print_matches(const std::vector &matches, { cout << termcolor::yellow; } - cout << format(translate(" In {0:s}: \n").str(), + cout << format(translate(" In {0:s}: \n").str().c_str(), fs::relative(matches[0].filepath_epub)); if (!opts.nocolor) { diff --git a/src/search.cpp b/src/search.cpp index 1362289..2995cf8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -44,8 +44,8 @@ std::vector search(const fs::path &filepath, const std::string_view regex, const settings &opts) { LOG(log::sev::info) - << format(R"(Starting search in {0:s} using regex "{1:s}")", filepath, - regex); + << format(R"(Starting search in {0:s} using regex "{1:s}")", + filepath.c_str(), regex); boost::regex::flag_type flags{}; switch (opts.regex) diff --git a/src/zip.cpp b/src/zip.cpp index 6907f8f..bb9e778 100644 --- a/src/zip.cpp +++ b/src/zip.cpp @@ -55,7 +55,7 @@ std::vector list(const fs::path &filepath) << format(translate("File in {0:s} is damaged. " "Skipping in-EPUB file.\n") .str() - .data(), + .c_str(), filepath); continue; }