mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Add MetaDataRef:get_keys (#12841)
This commit is contained in:
committed by
GitHub
parent
1a045da0dd
commit
cd8a7fe472
@@ -108,6 +108,15 @@ const StringMap &SimpleMetadata::getStrings(StringMap *) const
|
||||
return m_stringvars;
|
||||
}
|
||||
|
||||
const std::vector<std::string> &SimpleMetadata::getKeys(std::vector<std::string> *place) const
|
||||
{
|
||||
place->clear();
|
||||
place->reserve(m_stringvars.size());
|
||||
for (const auto &pair : m_stringvars)
|
||||
place->push_back(pair.first);
|
||||
return *place;
|
||||
}
|
||||
|
||||
const std::string *SimpleMetadata::getStringRaw(const std::string &name, std::string *) const
|
||||
{
|
||||
const auto found = m_stringvars.find(name);
|
||||
|
Reference in New Issue
Block a user