Template: createPage(): Take std::string_view
这个提交包含在:
父节点
aadb623bf7
当前提交
44ade88cae
@ -67,7 +67,7 @@ std::string Template::resolveIncludes(std::string_view content)
|
|||||||
return replacer.parse(content);
|
return replacer.parse(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
TemplatePage Template::createPage(std::string name)
|
TemplatePage Template::createPage(std::string_view name)
|
||||||
{
|
{
|
||||||
std::string content = loadResolvedPart(name);
|
std::string content = loadResolvedPart(name);
|
||||||
Varreplacer replacer(this->templateprefix);
|
Varreplacer replacer(this->templateprefix);
|
||||||
|
@ -24,7 +24,7 @@ class Template
|
|||||||
std::string getPartPath(std::string_view partname);
|
std::string getPartPath(std::string_view partname);
|
||||||
std::string loadResolvedPart(std::string_view partname);
|
std::string loadResolvedPart(std::string_view partname);
|
||||||
std::string loadPartContent(std::string_view partname);
|
std::string loadPartContent(std::string_view partname);
|
||||||
TemplatePage createPage(std::string name);
|
TemplatePage createPage(std::string_view name);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Template(std::string templateprefix, std::string templatepath, ConfigUrls &configUrls,
|
Template(std::string templateprefix, std::string templatepath, ConfigUrls &configUrls,
|
||||||
|
正在加载...
在新工单中引用
屏蔽一个用户