Better readability and optimization insertion into container by replacing 'insert' -> 'emplace', 'push_back' -> 'emplace_back'

This commit is contained in:
lainon committed 2022-09-30 12:35:28 +03:00
1 parent c953bf7fc7
commit 3cdf72b68b
20 files changed
+49 -49

No files matched your search

+2 -2
View File
@@ -2007,7 +2007,7 @@ int __KernelFreeTls(TLSPL *tls, SceUID threadID)
__KernelResumeThreadFromWait(waitingThreadID, freedAddress);
// Gotta watch the thread to quit as well, since they've allocated now.
tlsplThreadEndChecks.insert(std::make_pair(waitingThreadID, uid));
tlsplThreadEndChecks.emplace(waitingThreadID, uid);
// No need to continue or free it, we're done.
return 0;
@@ -2234,7 +2234,7 @@ int sceKernelGetTlsAddr(SceUID uid) {
if (allocBlock != -1)
{
tls->usage[allocBlock] = threadID;
tlsplThreadEndChecks.insert(std::make_pair(threadID, uid));
tlsplThreadEndChecks.emplace(threadID, uid);
--tls->ntls.freeBlocks;
needsClear = true;
}