diff --git a/plugins/GSdx/GSDevice.cpp b/plugins/GSdx/GSDevice.cpp index b01fa59245..615c538758 100644 --- a/plugins/GSdx/GSDevice.cpp +++ b/plugins/GSdx/GSDevice.cpp @@ -45,7 +45,7 @@ GSDevice::GSDevice() GSDevice::~GSDevice() { - for(auto &t : m_pool) delete t; + for(auto t : m_pool) delete t; delete m_backbuffer; delete m_merge; @@ -66,7 +66,7 @@ bool GSDevice::Create(const std::shared_ptr& wnd) bool GSDevice::Reset(int w, int h) { - for(auto &t : m_pool) delete t; + for(auto t : m_pool) delete t; m_pool.clear(); @@ -133,9 +133,9 @@ void GSDevice::Present(GSTexture* sTex, GSTexture* dTex, const GSVector4& dRect, GSTexture* GSDevice::FetchSurface(int type, int w, int h, bool msaa, int format) { - GSVector2i size(w, h); + const GSVector2i size(w, h); - for(list::iterator i = m_pool.begin(); i != m_pool.end(); ++i) + for(auto i = m_pool.begin(); i != m_pool.end(); ++i) { GSTexture* t = *i; @@ -154,9 +154,8 @@ void GSDevice::PrintMemoryUsage() { #ifdef ENABLE_OGL_DEBUG uint32 pool = 0; - for(list::iterator i = m_pool.begin(); i != m_pool.end(); i++) + for(auto t : m_pool) { - GSTexture* t = *i; if (t) pool += t->GetMemUsage(); } diff --git a/plugins/GSdx/GSDevice.h b/plugins/GSdx/GSDevice.h index 2c48763adf..7d9ada4c40 100644 --- a/plugins/GSdx/GSDevice.h +++ b/plugins/GSdx/GSDevice.h @@ -21,6 +21,7 @@ #pragma once +#include "GSFastList.h" #include "GSWnd.h" #include "GSTexture.h" #include "GSVertex.h" @@ -103,7 +104,7 @@ public: class GSDevice : public GSAlignedClass<32> { - list m_pool; + FastList m_pool; protected: std::shared_ptr m_wnd;