mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Avoid duplication of mod metadata in memory (#12562)
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
03428d9825
commit
f4a01f3a5d
37 changed files with 527 additions and 272 deletions
|
@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
void ItemStackMetadata::clear()
|
||||
{
|
||||
Metadata::clear();
|
||||
SimpleMetadata::clear();
|
||||
updateToolCapabilities();
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ bool ItemStackMetadata::setString(const std::string &name, const std::string &va
|
|||
sanitize_string(clean_name);
|
||||
sanitize_string(clean_var);
|
||||
|
||||
bool result = Metadata::setString(clean_name, clean_var);
|
||||
bool result = SimpleMetadata::setString(clean_name, clean_var);
|
||||
if (clean_name == TOOLCAP_KEY)
|
||||
updateToolCapabilities();
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue