diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-09-26 17:03:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-26 17:03:43 -0400 |
commit | f4a01f3a5dc0d8fe2f4f6d804d790da91d1bc30c (patch) | |
tree | 089ddc309e22ae8549ec3b86765ee272f57a33df /src/client/client.cpp | |
parent | 03428d9825cfdf2cfaed6ac9410dafccac0d4f3a (diff) | |
download | minetest-f4a01f3a5dc0d8fe2f4f6d804d790da91d1bc30c.tar.xz |
Avoid duplication of mod metadata in memory (#12562)
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 35634e77b..a0e867ae4 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1991,26 +1991,6 @@ const std::string* Client::getModFile(std::string filename) return &it->second; } -bool Client::registerModStorage(ModMetadata *storage) -{ - if (m_mod_storages.find(storage->getModName()) != m_mod_storages.end()) { - errorstream << "Unable to register same mod storage twice. Storage name: " - << storage->getModName() << std::endl; - return false; - } - - m_mod_storages[storage->getModName()] = storage; - return true; -} - -void Client::unregisterModStorage(const std::string &name) -{ - std::unordered_map<std::string, ModMetadata *>::const_iterator it = - m_mod_storages.find(name); - if (it != m_mod_storages.end()) - m_mod_storages.erase(name); -} - /* * Mod channels */ |