本文整理汇总了C++中std::unordered_multimap::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ unordered_multimap::erase方法的具体用法?C++ unordered_multimap::erase怎么用?C++ unordered_multimap::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::unordered_multimap
的用法示例。
在下文中一共展示了unordered_multimap::erase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PreFullReleaseModel
void PreFullReleaseModel(int streamingIdx)
{
int drawblDict = *(int*)0xF272E4;
if (streamingIdx >= GetTypeStart(drawblDict) && streamingIdx <= GetTypeEnd(drawblDict))
{
int dict = streamingIdx - GetTypeStart(drawblDict);
auto pair = m_dependencyDrawableDicts.equal_range(dict);
for (auto it = pair.first; it != pair.second; it++)
{
if (it->second->HasInstance())
{
//trace("releasing dict %s (0x%08x) for a full release because *reasons*\n", GetStreamName(dict, *(int*)0xF272E4).c_str(), it->second->GetModelHash());
it->second->RemoveInstance();
}
}
//m_dependencyDrawableDicts.erase(dict);
auto entPair = m_dependencyDictEnts.equal_range(dict);
for (auto it = entPair.first; it != entPair.second; it++)
{
//trace("also destroying model for dict %s\n", GetStreamName(dict, *(int*)0xF272E4).c_str());
it->second->DestroyModel();
}
m_dependencyDictEnts.erase(dict);
}
}
示例2: DrawableDictStoreGetUsageWrap
int DrawableDictStoreGetUsageWrap(int dict)
{
int usage = DrawblDictGetUsage(dict);
if (usage == 0 && _ReturnAddress() == (void*)0xBCC153)
{
bool deferred = false;
auto pair = m_dependencyDrawableDicts.equal_range(dict);
for (auto it = pair.first; it != pair.second; it++)
{
if (it->second->HasInstance())
{
if (!it->second->ShouldRelease())
{
//trace("model info for %s (0x%08x) still has %i references!\n", GetStreamName(dict, *(int*)0xF272E4).c_str(), it->second->GetModelHash(), it->second->GetRefCount());
return 1;
}
it->second->RemoveInstance();
deferred = true;
}
}
//m_dependencyDrawableDicts.erase(dict);
auto entPair = m_dependencyDictEnts.equal_range(dict);
for (auto it = entPair.first; it != entPair.second; it++)
{
it->second->DestroyModel();
deferred = true;
}
m_dependencyDictEnts.erase(dict);
if (deferred)
{
//trace("pre-deferring drawable destruction for %s\n", GetStreamName(dict, *(int*)0xF272E4).c_str());
DeferToNextFrame([=] ()
{
//trace("executing pre-deferred drawable destruction for %s\n", GetStreamName(dict, *(int*)0xF272E4).c_str());
//ReleaseDrawblDict(dict);
ReleaseStreamingObjectNow((void*)0xF21C60, dict + GetTypeStart(*(int*)0xF272E4));
});
return 1;
}
}
return usage;
}
示例3: findFromTextureCache
sf::RenderTexture* ShadowTextRenderer::findFromTextureCache(sf::Vector2u size)
{
auto it = shadowCache.find(size);
if (it != shadowCache.end())
{
auto ptr = it->second;
shadowCache.erase(it);
return ptr;
}
return 0;
}