summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-06-28 19:08:28 -0400
committerLioncash <mathew1800@gmail.com>2015-06-28 19:52:40 -0400
commitdaa205990fa043092394931b85be6efdc37408df (patch)
treed1e85f070ba34dc138e6744ddc18453b8f525d10 /Source/Core/VideoCommon
parent1120132d261f08fae7bb19933a4d814d52eca8a3 (diff)
Use emplace() instead of insert() where applicable for maps.
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/DriverDetails.cpp2
-rw-r--r--Source/Core/VideoCommon/OnScreenDisplay.cpp2
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp10
3 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp
index d3b1883cb3..04808c3e62 100644
--- a/Source/Core/VideoCommon/DriverDetails.cpp
+++ b/Source/Core/VideoCommon/DriverDetails.cpp
@@ -105,7 +105,7 @@ namespace DriverDetails
( bug.m_versionstart <= m_version || bug.m_versionstart == -1 ) &&
( bug.m_versionend > m_version || bug.m_versionend == -1 )
)
- m_bugs.insert(std::make_pair(bug.m_bug, bug));
+ m_bugs.emplace(bug.m_bug, bug);
}
}
diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp
index ddd80065e1..dfd597f0ed 100644
--- a/Source/Core/VideoCommon/OnScreenDisplay.cpp
+++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp
@@ -71,7 +71,7 @@ void ClearMessages()
// On-Screen Display Callbacks
void AddCallback(CallbackType type, Callback cb)
{
- s_callbacks.insert(std::pair<CallbackType, Callback>(type, cb));
+ s_callbacks.emplace(type, cb);
}
void DoCallbacks(CallbackType type)
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);
}