1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

vcmi: modernize lib/rmg

This commit is contained in:
Konstantin
2023-02-11 19:05:02 +03:00
parent c5dd8b17d7
commit 7bfb37df4d
34 changed files with 322 additions and 386 deletions

View File

@@ -66,9 +66,10 @@ const CRmgTemplate * CRmgTemplateStorage::getTemplate(const std::string & templa
std::vector<const CRmgTemplate *> CRmgTemplateStorage::getTemplates() const
{
std::vector<const CRmgTemplate *> result;
for(auto i=templates.cbegin(); i!=templates.cend(); ++i)
result.reserve(templates.size());
for(const auto & i : templates)
{
result.push_back(&i->second);
result.push_back(&i.second);
}
return result;
}