diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-06-28 19:08:28 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-06-28 19:52:40 -0400 |
| commit | daa205990fa043092394931b85be6efdc37408df (patch) | |
| tree | d1e85f070ba34dc138e6744ddc18453b8f525d10 /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | 1120132d261f08fae7bb19933a4d814d52eca8a3 (diff) | |
Use emplace() instead of insert() where applicable for maps.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 0b0588cf6e..6baca12326 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -474,7 +474,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage) decoded_entry->is_efb_copy = false; g_texture_cache->ConvertTexture(decoded_entry, entry, &texMem[tlutaddr], (TlutFormat)tlutfmt); - textures_by_address.insert(TexCache::value_type((u64)address, decoded_entry)); + textures_by_address.emplace((u64)address, decoded_entry); return ReturnEntry(stage, decoded_entry); } @@ -560,11 +560,11 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage) TCacheEntryBase* entry = AllocateTexture(config); GFX_DEBUGGER_PAUSE_AT(NEXT_NEW_TEXTURE, true); - textures_by_address.insert(TexCache::value_type((u64)address, entry)); + textures_by_address.emplace((u64)address, entry); if (g_ActiveConfig.iSafeTextureCache_ColorSamples == 0 || std::max(texture_size, palette_size) <= (u32)g_ActiveConfig.iSafeTextureCache_ColorSamples * 8) { - entry->textures_by_hash_iter = textures_by_hash.insert(TexCache::value_type(full_hash, entry)); + entry->textures_by_hash_iter = textures_by_hash.emplace(full_hash, entry); } entry->SetGeneralParameters(address, texture_size, full_format); @@ -963,7 +963,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat count++), 0); } - textures_by_address.insert(TexCache::value_type((u64)dstAddr, entry)); + textures_by_address.emplace((u64)dstAddr, entry); } TextureCache::TCacheEntryBase* TextureCache::AllocateTexture(const TCacheEntryConfig& config) @@ -996,7 +996,7 @@ TextureCache::TexCache::iterator TextureCache::FreeTexture(TexCache::iterator it } entry->frameCount = FRAMECOUNT_INVALID; - texture_pool.insert(TexPool::value_type(entry->config, entry)); + texture_pool.emplace(entry->config, entry); return textures_by_address.erase(iter); } |
