summaryrefslogtreecommitdiff
path: root/src/content_mapblock.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-29 20:36:09 +0200
committerGitHub <noreply@github.com>2017-04-29 20:36:09 +0200
commit95409da87d009c352f27c737621972c2225796c9 (patch)
treec7ba89f77a18316f33cd71637398ae3f0f86bf0d /src/content_mapblock.h
parentc729543ec4ab5cba167b97f0b8c796de3de88a26 (diff)
downloadminetest-95409da87d009c352f27c737621972c2225796c9.tar.gz
minetest-95409da87d009c352f27c737621972c2225796c9.tar.bz2
minetest-95409da87d009c352f27c737621972c2225796c9.zip
Optimize updateFastFaceRow processing by removing some TileSpec copy (#5678)
* Optimize updateFastFaceRow processing by removing some TileSpec copy It permit to decrease this function from 54% runtime to 45% and reduce copy from 14% runtime to 12.5% getTileInfo also reduced from 27% to 23% * makeFastFace should use a const ref too this trigger a const pointer need in the underlying function Also fix some code style and prevent calculating 4 times the same position at a point * Reduce a comparison cost for lights in updateFastFaceRow
Diffstat (limited to 'src/content_mapblock.h')
-rw-r--r--src/content_mapblock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content_mapblock.h b/src/content_mapblock.h
index 6866a4498..310e38e7c 100644
--- a/src/content_mapblock.h
+++ b/src/content_mapblock.h
@@ -65,7 +65,7 @@ public:
void useTile(int index, bool disable_backface_culling);
void useDefaultTile(bool set_color = true);
- TileSpec getTile(const v3s16 &direction);
+ void getTile(const v3s16 &direction, TileSpec &tile);
// face drawing
void drawQuad(v3f *vertices, const v3s16 &normal = v3s16(0, 0, 0));