mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue