[Tablegen] Use a references, instead of copies
This commit is contained in:
parent
410ee18a5c
commit
f15db30fb9
2 changed files with 9 additions and 8 deletions
|
@ -12,17 +12,18 @@
|
|||
|
||||
namespace Tablegen
|
||||
{
|
||||
std::string GeneratePage(std::vector<CharacterInfo> characters,
|
||||
std::string GeneratePage(const std::vector<CharacterInfo>& characters,
|
||||
const Settings& settings = Settings::Default());
|
||||
|
||||
void GeneratePage(const std::string& path, std::vector<CharacterInfo> characters,
|
||||
void GeneratePage(const std::string& path, const std::vector<CharacterInfo>& characters,
|
||||
const Settings& settings = Settings::Default());
|
||||
|
||||
# ifdef TABLEGEN_EXPOSE_XML
|
||||
void GenerateAsChild(pugi::xml_node& node, std::vector<CharacterInfo> characters,
|
||||
void GenerateAsChild(pugi::xml_node& node, const std::vector<CharacterInfo>& characters,
|
||||
const Settings& settings = Settings::Default());
|
||||
|
||||
pugi::xml_document GenerateDocument(std::vector<CharacterInfo> characters, const Settings& settings = Settings::Default());
|
||||
pugi::xml_document GenerateDocument(const std::vector<CharacterInfo>& characters,
|
||||
const Settings& settings = Settings::Default());
|
||||
# endif
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace Tablegen
|
|||
}
|
||||
}
|
||||
|
||||
std::string GeneratePage(std::vector<CharacterInfo> characters, const Settings& settings)
|
||||
std::string GeneratePage(const std::vector<CharacterInfo>& characters, const Settings& settings)
|
||||
{
|
||||
pugi::xml_document doc = GenerateDocument(characters, settings);
|
||||
|
||||
|
@ -106,7 +106,7 @@ namespace Tablegen
|
|||
return str.str();
|
||||
}
|
||||
|
||||
void GeneratePage(const std::string& path, std::vector<CharacterInfo> characters,
|
||||
void GeneratePage(const std::string& path, const std::vector<CharacterInfo>& characters,
|
||||
const Settings& settings)
|
||||
{
|
||||
pugi::xml_document doc = GenerateDocument(characters, settings);
|
||||
|
@ -116,7 +116,7 @@ namespace Tablegen
|
|||
doc.save_file("test.html", " ", formatOptions);
|
||||
}
|
||||
|
||||
void GenerateAsChild(pugi::xml_node& node, std::vector<CharacterInfo> characters,
|
||||
void GenerateAsChild(pugi::xml_node& node, const std::vector<CharacterInfo>& characters,
|
||||
const Settings& settings)
|
||||
{
|
||||
pugi::xml_node tableRoot = node;
|
||||
|
@ -203,7 +203,7 @@ namespace Tablegen
|
|||
script.append_child(pugi::node_pcdata).set_value(Script(indent, tagIndent, buttons));
|
||||
}
|
||||
|
||||
pugi::xml_document GenerateDocument(std::vector<CharacterInfo> characters,
|
||||
pugi::xml_document GenerateDocument(const std::vector<CharacterInfo>& characters,
|
||||
const Settings& settings)
|
||||
{
|
||||
pugi::xml_document doc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue