diff options
author | Lars Hofhansl <larsh@apache.org> | 2019-07-16 15:55:17 -0700 |
---|---|---|
committer | Lars Hofhansl <larsh@apache.org> | 2019-07-16 15:55:17 -0700 |
commit | 9fe32461540316d9ef06b2f06c02684c36c5fa94 (patch) | |
tree | b047d363f95a5e91fc89e4fff6fa3f010c1f5e32 /src/client/clientobject.h | |
parent | 41229696be5878effa53a9a754766857d70f417d (diff) | |
download | hax-minetest-server-9fe32461540316d9ef06b2f06c02684c36c5fa94.tar.gz hax-minetest-server-9fe32461540316d9ef06b2f06c02684c36c5fa94.zip |
Optimize getting active objects a bit. #8674
Diffstat (limited to 'src/client/clientobject.h')
-rw-r--r-- | src/client/clientobject.h | 7 |
1 files changed, 5 insertions, 2 deletions
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<u16, Factory> 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; }; |