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 << 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)
{

View File

@ -44,8 +44,8 @@ std::vector<match> 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)

View File

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