From 9fe32461540316d9ef06b2f06c02684c36c5fa94 Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Tue, 16 Jul 2019 15:55:17 -0700 Subject: Optimize getting active objects a bit. #8674 --- src/client/clientobject.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/client/clientobject.h') diff --git a/src/client/clientobject.h b/src/client/clientobject.h index 9377d1e67..5e34177e4 100644 --- a/src/client/clientobject.h +++ b/src/client/clientobject.h @@ -90,10 +90,10 @@ private: static std::unordered_map m_types; }; -struct DistanceSortedActiveObject +class DistanceSortedActiveObject { +public: ClientActiveObject *obj; - f32 d; DistanceSortedActiveObject(ClientActiveObject *a_obj, f32 a_d) { @@ -105,4 +105,7 @@ struct DistanceSortedActiveObject { return d < other.d; } + +private: + f32 d; }; -- cgit v1.2.3