1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Optimize SAO getStaticData by using std::string pointer instead of return copy

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
This commit is contained in:
Loic Blot 2017-01-11 22:48:14 +01:00 committed by Loïc Blot
parent e2dd96b432
commit ef0aa7d5b5
4 changed files with 14 additions and 12 deletions

View file

@ -119,10 +119,10 @@ public:
when it is created (converted from static to active - actually
the data is the static form)
*/
virtual std::string getStaticData()
virtual void getStaticData(std::string *result)
{
assert(isStaticAllowed());
return "";
*result = "";
}
/*
Return false in here to never save and instead remove object