summaryrefslogtreecommitdiff
path: root/src/content_sao.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/content_sao.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/content_sao.h')
-rw-r--r--src/content_sao.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 4d6cf4dcf..4abe93250 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -102,7 +102,7 @@ public:
const std::string &data);
void step(float dtime, bool send_recommended);
std::string getClientInitializationData(u16 protocol_version);
- std::string getStaticData() const;
+ void getStaticData(std::string *result) const;
int punch(v3f dir,
const ToolCapabilities *toolcap=NULL,
ServerActiveObject *puncher=NULL,
@@ -199,7 +199,7 @@ public:
void removingFromEnvironment();
bool isStaticAllowed() const { return false; }
std::string getClientInitializationData(u16 protocol_version);
- std::string getStaticData() const;
+ void getStaticData(std::string *result) const;
void step(float dtime, bool send_recommended);
void setBasePosition(const v3f &position);
void setPos(const v3f &pos);