From e1ae8881918415ef13fdea7c7087d01d873ad07a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 13 Apr 2023 21:20:17 +0200 Subject: actually pre-sorting won't speed it up --- src/chunk-scenery.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/chunk-scenery.cpp b/src/chunk-scenery.cpp index b17b2e2a..ad29a3d7 100644 --- a/src/chunk-scenery.cpp +++ b/src/chunk-scenery.cpp @@ -5,7 +5,6 @@ #include "tile-atlas.hpp" #include #include -#include namespace floormat { @@ -186,7 +185,6 @@ auto chunk::ensure_scenery_mesh(scenery_scratch_buffers buffers) noexcept -> sce auto index = e->is_dynamic() ? (uint32_t)-1 : j++; array[i++] = { e.get(), (uint32_t)-1, e->ordinal(), make_topo_sort_data(*e, index) }; } - std::sort(array.begin(), array.begin() + size, [](const auto& a, const auto& b) { return a.ord < b.ord; }); topological_sort(array, size); return { scenery_mesh, ArrayView{array, size}, j }; -- cgit v1.2.3