Fix html::page declaration/definition divergence from the const sweep

The four defaulted parameters in html_util.h stayed by-value while the
definition became const&, leaving the called overload undefined.
Linux's -shared linking hid it (lazy dlopen resolution); it broke the
book-structure HTML path at runtime. Both sides now agree (const&,
defaults kept); combine_files converted consistently as well.

(from dev a910e11431d2)
This commit is contained in:
2026-07-31 00:25:18 +02:00
parent ef77f03584
commit 55e1a1f3ac
4 changed files with 12 additions and 12 deletions

View File

@@ -570,12 +570,12 @@ strings_t find_files_with_extension(
}
std::string combine_files(
std::vector<std::string> filenames,
std::string prolog, std::string epilog,
std::function <std::string(std::string)> processor)
const std::vector<std::string>& filenames,
const std::string& prolog, const std::string& epilog,
const std::function <std::string(std::string)>& processor)
{
std::string result = prolog;
for (std::string f : filenames) {
for (const std::string& f : filenames) {
result += "\n/* " + file_basename(f) + " */\n";
result += string_from_file(f);
}