mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add MetaDataRef:get_keys (#12841)
This commit is contained in:
parent
1a045da0dd
commit
cd8a7fe472
20 changed files with 125 additions and 0 deletions
|
@ -92,6 +92,17 @@ bool Database_Dummy::getModEntries(const std::string &modname, StringMap *storag
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Database_Dummy::getModKeys(const std::string &modname, std::vector<std::string> *storage)
|
||||
{
|
||||
const auto mod_pair = m_mod_meta_database.find(modname);
|
||||
if (mod_pair != m_mod_meta_database.cend()) {
|
||||
storage->reserve(storage->size() + mod_pair->second.size());
|
||||
for (const auto &pair : mod_pair->second)
|
||||
storage->push_back(pair.first);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Database_Dummy::getModEntry(const std::string &modname,
|
||||
const std::string &key, std::string *value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue