mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Get rid of unused iterators.
Also fix the formatting in 3 sprintf calls.
This commit is contained in:
parent
fddae9a051
commit
025a1351b4
2 changed files with 9 additions and 11 deletions
|
@ -301,29 +301,27 @@ void JitBlockCache::LinkBlock(int i)
|
|||
{
|
||||
LinkBlockExits(i);
|
||||
JitBlock &b = blocks[i];
|
||||
std::map<u32, int>::iterator iter;
|
||||
pair<multimap<u32, int>::iterator, multimap<u32, int>::iterator> ppp;
|
||||
// equal_range(b) returns pair<iterator,iterator> representing the range
|
||||
// of element with key b
|
||||
ppp = links_to.equal_range(b.originalAddress);
|
||||
if (ppp.first == ppp.second)
|
||||
return;
|
||||
for (multimap<u32, int>::iterator iter2 = ppp.first; iter2 != ppp.second; ++iter2) {
|
||||
// PanicAlert("Linking block %i to block %i", iter2->second, i);
|
||||
LinkBlockExits(iter2->second);
|
||||
for (multimap<u32, int>::iterator iter = ppp.first; iter != ppp.second; ++iter) {
|
||||
// PanicAlert("Linking block %i to block %i", iter->second, i);
|
||||
LinkBlockExits(iter->second);
|
||||
}
|
||||
}
|
||||
|
||||
void JitBlockCache::UnlinkBlock(int i)
|
||||
{
|
||||
JitBlock &b = blocks[i];
|
||||
std::map<u32, int>::iterator iter;
|
||||
pair<multimap<u32, int>::iterator, multimap<u32, int>::iterator> ppp;
|
||||
ppp = links_to.equal_range(b.originalAddress);
|
||||
if (ppp.first == ppp.second)
|
||||
return;
|
||||
for (multimap<u32, int>::iterator iter2 = ppp.first; iter2 != ppp.second; ++iter2) {
|
||||
JitBlock &sourceBlock = blocks[iter2->second];
|
||||
for (multimap<u32, int>::iterator iter = ppp.first; iter != ppp.second; ++iter) {
|
||||
JitBlock &sourceBlock = blocks[iter->second];
|
||||
for (int e = 0; e < 2; e++)
|
||||
{
|
||||
if (sourceBlock.exitAddress[e] == b.originalAddress)
|
||||
|
@ -374,7 +372,7 @@ void JitBlockCache::InvalidateICache(u32 address, const u32 length)
|
|||
|
||||
// destroy JIT blocks
|
||||
// !! this works correctly under assumption that any two overlapping blocks end at the same address
|
||||
std::map<pair<u32,u32>, u32>::iterator it1 = block_map.lower_bound(std::make_pair(pAddr, 0)), it2 = it1, it;
|
||||
std::map<pair<u32,u32>, u32>::iterator it1 = block_map.lower_bound(std::make_pair(pAddr, 0)), it2 = it1;
|
||||
while (it2 != block_map.end() && it2->first.second < pAddr + length)
|
||||
{
|
||||
DestroyBlock(it2->second, true);
|
||||
|
|
|
@ -730,15 +730,15 @@ void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *buffer) {
|
|||
break;
|
||||
|
||||
case GE_CMD_COLORTEST:
|
||||
sprintf(buffer, "ColorTest: %06", data);
|
||||
sprintf(buffer, "ColorTest: %06x", data);
|
||||
break;
|
||||
|
||||
case GE_CMD_COLORREF:
|
||||
sprintf(buffer, "ColorRef: %06", data);
|
||||
sprintf(buffer, "ColorRef: %06x", data);
|
||||
break;
|
||||
|
||||
case GE_CMD_COLORTESTMASK:
|
||||
sprintf(buffer, "ColorTestMask: %06", data);
|
||||
sprintf(buffer, "ColorTestMask: %06x", data);
|
||||
break;
|
||||
|
||||
case GE_CMD_MASKRGB:
|
||||
|
|
Loading…
Add table
Reference in a new issue