mirror of https://github.com/PCSX2/pcsx2.git
GSdx GSLocalMemory: Reserve space required in the std::vector before adding elements to it.
This commit is contained in:
parent
3300470a29
commit
f8e89b694a
|
@ -699,6 +699,9 @@ vector<GSVector2i>* GSLocalMemory::GetPage2TileMap(const GIFRegTEX0& TEX0)
|
|||
}
|
||||
}
|
||||
|
||||
// Allocate vector with initial size
|
||||
p2t[page].reserve(m.size());
|
||||
|
||||
// sort by x and flip the mask (it will be used to erase a lot of bits in a loop, [x] &= ~y)
|
||||
|
||||
for(hash_map<uint32, uint32>::iterator j = m.begin(); j != m.end(); ++j)
|
||||
|
|
Loading…
Reference in New Issue