MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / dock

Method dock

ogsr_engine/xr_3da/SkeletonMotions.cpp:244–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242bool motions_container::has(shared_str key) { return (container.find(key) != container.end()); }
243
244motions_value* motions_container::dock(shared_str key, IReader* data, vecBones* bones)
245{
246 motions_value* result = nullptr;
247 auto I = container.find(key);
248 if (I != container.end())
249 result = I->second;
250 if (nullptr == result)
251 {
252 // loading motions
253 VERIFY(data);
254 result = xr_new<motions_value>();
255 result->m_dwReference = 0;
256 BOOL bres = result->load(key.c_str(), data, bones);
257 if (bres)
258 container.emplace(key, result);
259 else
260 xr_delete(result);
261 }
262 return result;
263}
264void motions_container::clean(bool force_destroy)
265{
266 auto it = container.begin();

Callers 1

createMethod · 0.45

Calls 6

xr_deleteFunction · 0.85
emplaceMethod · 0.80
findMethod · 0.45
endMethod · 0.45
loadMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected