pass c strings to fmt
continuous-integration/drone/push Build is passing Details

boost strings and filesystem paths used to be automatically converted,
but that doesn't happen anymore with fmt 9
This commit is contained in:
tastytea 2022-08-16 16:26:17 +02:00
parent cd03898039
commit 63a8ab2683
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ void print_matches(const std::vector<search::match> &matches,
{ {
cout << termcolor::yellow; 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)); fs::relative(matches[0].filepath_epub));
if (!opts.nocolor) if (!opts.nocolor)
{ {

View File

@ -44,8 +44,8 @@ std::vector<match> search(const fs::path &filepath,
const std::string_view regex, const settings &opts) const std::string_view regex, const settings &opts)
{ {
LOG(log::sev::info) LOG(log::sev::info)
<< format(R"(Starting search in {0:s} using regex "{1:s}")", filepath, << format(R"(Starting search in {0:s} using regex "{1:s}")",
regex); filepath.c_str(), regex);
boost::regex::flag_type flags{}; boost::regex::flag_type flags{};
switch (opts.regex) switch (opts.regex)

View File

@ -55,7 +55,7 @@ std::vector<std::string> list(const fs::path &filepath)
<< format(translate("File in {0:s} is damaged. " << format(translate("File in {0:s} is damaged. "
"Skipping in-EPUB file.\n") "Skipping in-EPUB file.\n")
.str() .str()
.data(), .c_str(),
filepath); filepath);
continue; continue;
} }