MCPcopy Create free account
hub / github.com/axmolengine/axmol / removeSpriteFramesFromDictionary

Method removeSpriteFramesFromDictionary

core/2d/SpriteFrameCache.cpp:244–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244void SpriteFrameCache::removeSpriteFramesFromDictionary(ValueMap& dictionary)
245{
246 if (dictionary["frames"].getType() != ax::Value::Type::MAP)
247 return;
248
249 const auto& framesDict = dictionary["frames"].asValueMap();
250 std::vector<uint64_t> keysToRemove;
251
252 for (const auto& iter : framesDict)
253 {
254 auto frameId = computeHash(iter.first);
255 if (findFrame(frameId))
256 {
257 keysToRemove.emplace_back(frameId);
258 }
259 }
260
261 eraseFrames(keysToRemove);
262}
263
264void SpriteFrameCache::removeSpriteFramesFromTexture(Texture2D* texture)
265{

Callers

nothing calls this directly

Calls 3

computeHashFunction · 0.85
getTypeMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected