Template: createPage(): Take std::string_view

This commit is contained in:
Albert S. 2021-10-09 00:10:19 +02:00
父節點 aadb623bf7
當前提交 44ade88cae
共有 2 個文件被更改,包括 2 次插入2 次删除

查看文件

@ -67,7 +67,7 @@ std::string Template::resolveIncludes(std::string_view content)
return replacer.parse(content);
}
TemplatePage Template::createPage(std::string name)
TemplatePage Template::createPage(std::string_view name)
{
std::string content = loadResolvedPart(name);
Varreplacer replacer(this->templateprefix);

查看文件

@ -24,7 +24,7 @@ class Template
std::string getPartPath(std::string_view partname);
std::string loadResolvedPart(std::string_view partname);
std::string loadPartContent(std::string_view partname);
TemplatePage createPage(std::string name);
TemplatePage createPage(std::string_view name);
public:
Template(std::string templateprefix, std::string templatepath, ConfigUrls &configUrls,