summaryrefslogtreecommitdiff
path: root/src/serverobject.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-01-11 22:48:14 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-01-13 21:56:24 +0100
commitef0aa7d5b543b6561e1b7292b2d0a0ac43add55d (patch)
treef5c396ec87193c2a2ea4ef4c1672939dc506507a /src/serverobject.h
parente2dd96b432f057cd8a3886314c78a79138a99c5e (diff)
downloadminetest-ef0aa7d5b543b6561e1b7292b2d0a0ac43add55d.tar.gz
minetest-ef0aa7d5b543b6561e1b7292b2d0a0ac43add55d.tar.bz2
minetest-ef0aa7d5b543b6561e1b7292b2d0a0ac43add55d.zip
Optimize SAO getStaticData by using std::string pointer instead of return copy
Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
Diffstat (limited to 'src/serverobject.h')
-rw-r--r--src/serverobject.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serverobject.h b/src/serverobject.h
index 9e8b5a779..26c8b062d 100644
--- a/src/serverobject.h
+++ b/src/serverobject.h
@@ -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