From 9a17b65f26eea5b9d7176e7df205f72ed2ff6c0f Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Wed, 26 Jul 2017 07:35:09 +0200 Subject: VoxelManip cleanups (const ref, const move) + function removal (#6169) * VoxelManip cleanups (const ref, const move) permitting to improve a little bit performance * VoxelArea: precalculate extent (performance enhancement) This permits to reduce extend high cost to zero and drop many v3s16 object creation/removal to calculate extent It rebalance the client thread update to updateFastFaceRow instead of MapBlockMesh generation This will also benefits to mapgen --- src/mg_decoration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mg_decoration.cpp') diff --git a/src/mg_decoration.cpp b/src/mg_decoration.cpp index 4af7a7897..4e53e037f 100644 --- a/src/mg_decoration.cpp +++ b/src/mg_decoration.cpp @@ -299,7 +299,7 @@ size_t DecoSimple::generate(MMVManip *vm, PcgRandom *pr, v3s16 p) bool force_placement = (flags & DECO_FORCE_PLACEMENT); - v3s16 em = vm->m_area.getExtent(); + const v3s16 &em = vm->m_area.getExtent(); u32 vi = vm->m_area.index(p); for (int i = 0; i < height; i++) { vm->m_area.add_y(em, vi, 1); -- cgit v1.2.3