Naturally, modern C++ would not build on Symbian.

This commit is contained in:
Unknown W. Brackets 2014-11-03 08:41:53 -08:00
parent 61c21340fb
commit ad6b176e11
3 changed files with 11 additions and 4 deletions

View File

@ -305,7 +305,7 @@ public:
Do(first);
typename M::mapped_type second = default_val;
Do(second);
x.emplace(first, second);
x.insert(std::make_pair(first, second));
--number;
}
}

View File

@ -200,7 +200,7 @@ void JitBlockCache::ProxyBlock(u32 rootAddress, u32 startAddress, u32 size, cons
// Make binary searches and stuff work ok
b.normalEntry = codePtr;
b.checkedEntry = codePtr;
proxyBlockMap_.emplace(startAddress, num_blocks_);
proxyBlockMap_.insert(std::make_pair(startAddress, num_blocks_));
AddBlockMap(num_blocks_);
num_blocks_++; //commit the current block
@ -253,7 +253,7 @@ void JitBlockCache::FinalizeBlock(int block_num, bool block_link) {
if (block_link) {
for (int i = 0; i < MAX_JIT_BLOCK_EXITS; i++) {
if (b.exitAddress[i] != INVALID_EXIT) {
links_to_.emplace(b.exitAddress[i], block_num);
links_to_.insert(std::make_pair(b.exitAddress[i], block_num));
latestExit = std::max(latestExit, b.exitAddress[i]);
}
}

View File

@ -51,7 +51,12 @@ recursive_mutex functions_lock;
// One function can appear in multiple copies in memory, and they will all have
// the same hash and should all be replaced if possible.
#ifdef __SYMBIAN32__
// Symbian does not have a functional unordered_multimap.
static std::multimap<u64, MIPSAnalyst::AnalyzedFunction *> hashToFunction;
#else
static std::unordered_multimap<u64, MIPSAnalyst::AnalyzedFunction *> hashToFunction;
#endif
struct HashMapFunc {
char name[64];
@ -662,11 +667,13 @@ namespace MIPSAnalyst {
void UpdateHashToFunctionMap() {
lock_guard guard(functions_lock);
hashToFunction.clear();
#ifndef __SYMBIAN32__
hashToFunction.reserve(functions.size());
#endif
for (auto iter = functions.begin(); iter != functions.end(); iter++) {
AnalyzedFunction &f = *iter;
if (f.hasHash && f.size > 16) {
hashToFunction.emplace(f.hash, &f);
hashToFunction.insert(std::make_pair(f.hash, &f));
}
}
}