MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / CountLockedItems

Method CountLockedItems

editor/WorldObjectsGenericDialog.cpp:188–204  ·  view source on GitHub ↗

Returns the number of locked items of the current type

Source from the content-addressed store, hash-verified

186
187// Returns the number of locked items of the current type
188int CWorldObjectsGenericDialog::CountLockedItems() {
189 int lock_count = 0;
190 int first, n;
191
192 first = n = GetObjectID(m_type);
193
194 if (first == -1)
195 return 0;
196
197 do {
198 if (IsLocked(n))
199 lock_count++;
200 n = GetNextObjectID(n);
201 } while (n != first);
202
203 return lock_count;
204}
205
206#define NULL_NAME "<none>"
207

Callers

nothing calls this directly

Calls 2

GetNextObjectIDFunction · 0.85
GetObjectIDFunction · 0.50

Tested by

no test coverage detected