mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Performance improvement: Use std::list instead of std::vector for request_media, Server::getModNames, Environment::m_simple_objects.
* Also remove unused Server::m_modspaths
This commit is contained in:
parent
b214cde5b4
commit
365e4ae0fa
8 changed files with 16 additions and 21 deletions
|
@ -3188,10 +3188,9 @@ const ModSpec* Server::getModSpec(const std::string &modname)
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
void Server::getModNames(std::list<std::string> &modlist)
|
||||
void Server::getModNames(std::vector<std::string> &modlist)
|
||||
{
|
||||
for(std::vector<ModSpec>::iterator i = m_mods.begin(); i != m_mods.end(); i++)
|
||||
{
|
||||
for(std::vector<ModSpec>::iterator i = m_mods.begin(); i != m_mods.end(); i++) {
|
||||
modlist.push_back(i->name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue