File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 66#include " xrGame/quadtree.h"
77#include " xrGame/cover_point.h"
88#include " Common/object_broker.h"
9+ #include " xrCommon/xr_unordered_map.h"
910
1011Shader_xrLC_LIB* g_shaders_xrlc;
1112xr_vector<b_material> g_materials;
@@ -167,17 +168,17 @@ class Query
167168public:
168169 Nearest q_List;
169170 Nearest q_Clear;
170- Marks q_Marks;
171+ xr_unordered_map< u32 , bool > q_Marks;
171172 Fvector q_Base;
172173
173- IC void Begin (int count)
174+ IC void Begin (const int count)
174175 {
175176 q_List.reserve (8192 );
176177 q_Clear.reserve (8192 );
177- q_Marks.assign (count, false );
178+ q_Marks.reserve (count);
178179 }
179180
180- IC void Init (Fvector& P)
181+ IC void Init (const Fvector& P)
181182 {
182183 q_Base.set (P);
183184 q_List.clear ();
@@ -188,8 +189,6 @@ class Query
188189 {
189190 if (ID == InvalidNode)
190191 return ;
191- if (ID >= q_Marks.size ())
192- return ;
193192 if (q_Marks[ID])
194193 return ;
195194
@@ -211,8 +210,7 @@ class Query
211210
212211 IC void Clear ()
213212 {
214- for (auto &i : q_Clear)
215- q_Marks[i] = false ;
213+ q_Marks.clear ();
216214 }
217215};
218216struct RC
You can’t perform that action at this time.
0 commit comments