GSdx GSCodeBuffer: std::vector instead of std::list, to speedup linear scan. Using range loop on destruction.

This commit is contained in:
Alessandro Vetere 2017-05-24 09:06:59 +02:00 committed by Gregory Hainaut
parent 798d6a9134
commit 3300470a29
2 changed files with 3 additions and 3 deletions

View File

@ -32,9 +32,9 @@ GSCodeBuffer::GSCodeBuffer(size_t blocksize)
GSCodeBuffer::~GSCodeBuffer()
{
for(list<void*>::iterator i = m_buffers.begin(); i != m_buffers.end(); ++i)
for(auto buffer : m_buffers)
{
vmfree(*i, m_blocksize);
vmfree(buffer, m_blocksize);
}
}

View File

@ -23,7 +23,7 @@
class GSCodeBuffer
{
list<void*> m_buffers;
std::vector<void*> m_buffers;
size_t m_blocksize;
size_t m_pos, m_reserved;
uint8* m_ptr;