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:
@@ -41,7 +41,7 @@ are regenerated on each release — patches cannot be merged directly.
|
|||||||
Report problems (or send patches) to the author; accepted changes are
|
Report problems (or send patches) to the author; accepted changes are
|
||||||
applied to the development tree and appear in a following snapshot.
|
applied to the development tree and appear in a following snapshot.
|
||||||
|
|
||||||
This snapshot was assembled from development commit `64b1abf23e56`.
|
This snapshot was assembled from development commit `a910e11431d2`.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -570,12 +570,12 @@ strings_t find_files_with_extension(
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string combine_files(
|
std::string combine_files(
|
||||||
std::vector<std::string> filenames,
|
const std::vector<std::string>& filenames,
|
||||||
std::string prolog, std::string epilog,
|
const std::string& prolog, const std::string& epilog,
|
||||||
std::function <std::string(std::string)> processor)
|
const std::function <std::string(std::string)>& processor)
|
||||||
{
|
{
|
||||||
std::string result = prolog;
|
std::string result = prolog;
|
||||||
for (std::string f : filenames) {
|
for (const std::string& f : filenames) {
|
||||||
result += "\n/* " + file_basename(f) + " */\n";
|
result += "\n/* " + file_basename(f) + " */\n";
|
||||||
result += string_from_file(f);
|
result += string_from_file(f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ std::vector<fs::path> pathnames_with_extension(
|
|||||||
std::vector<std::string> find_files_with_extension(
|
std::vector<std::string> find_files_with_extension(
|
||||||
const fs::path& root, const std::string& ext, bool case_insensitive=false);
|
const fs::path& root, const std::string& ext, bool case_insensitive=false);
|
||||||
std::string combine_files(
|
std::string combine_files(
|
||||||
std::vector<std::string> filenames,
|
const std::vector<std::string>& filenames,
|
||||||
std::string prolog="", std::string epilog="",
|
const std::string& prolog="", const std::string& epilog="",
|
||||||
std::function <std::string(std::string)> processor = nullptr);
|
const std::function <std::string(std::string)>& processor = nullptr);
|
||||||
|
|
||||||
bool files_differ(const fs::path& p1,
|
bool files_differ(const fs::path& p1,
|
||||||
const fs::path& p2,
|
const fs::path& p2,
|
||||||
|
|||||||
@@ -88,10 +88,10 @@ namespace html {
|
|||||||
const std::string& version,
|
const std::string& version,
|
||||||
const std::string& copyright,
|
const std::string& copyright,
|
||||||
const std::string& css,
|
const std::string& css,
|
||||||
strings_t css_filenames = {},
|
const strings_t& css_filenames = {},
|
||||||
strings_t js_filenames = {},
|
const strings_t& js_filenames = {},
|
||||||
strings_t local_fonts = {},
|
const strings_t& local_fonts = {},
|
||||||
std::string logo = {});
|
const std::string& logo = {});
|
||||||
|
|
||||||
void add_title(elements_t& body, const std::string& title, const std::string& logo="");
|
void add_title(elements_t& body, const std::string& title, const std::string& logo="");
|
||||||
void add_title(elements_t& body, const std::string& title, const std::string& logo);
|
void add_title(elements_t& body, const std::string& title, const std::string& logo);
|
||||||
|
|||||||
Reference in New Issue
Block a user