From: Côme Chilliet Date: Thu, 15 Dec 2016 13:35:48 +0000 (+0700) Subject: Ditched unused private list in TextureRes X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=commitdiff_plain;h=3f8ee86c6085b5d6c7ee31b916d0e022239750ab Ditched unused private list in TextureRes --- diff --git a/Source/Graphic/Texture.cpp b/Source/Graphic/Texture.cpp index e2565e9..fe732bf 100644 --- a/Source/Graphic/Texture.cpp +++ b/Source/Graphic/Texture.cpp @@ -27,8 +27,6 @@ using namespace std; extern bool trilinear; -vector TextureRes::list; - void TextureRes::load() { ImageRec texture; @@ -83,7 +81,6 @@ TextureRes::TextureRes(const string& _filename, bool _hasMipmap): skinsize(0), data(NULL), datalen(0) { load(); - list.push_back(this); } TextureRes::TextureRes(const string& _filename, bool _hasMipmap, GLubyte* array, int* skinsizep): @@ -94,18 +91,12 @@ TextureRes::TextureRes(const string& _filename, bool _hasMipmap, GLubyte* array, *skinsizep = skinsize; for (int i = 0; i < datalen; i++) array[i] = data[i]; - list.push_back(this); } TextureRes::~TextureRes() { free(data); glDeleteTextures(1, &id); - for (vector::iterator it = list.begin(); it != list.end(); it++) - if (*it == this) { - list.erase(it); - break; - } } void Texture::load(const string& filename, bool hasMipmap) diff --git a/Source/Graphic/Texture.hpp b/Source/Graphic/Texture.hpp index ab51cdb..0f12828 100644 --- a/Source/Graphic/Texture.hpp +++ b/Source/Graphic/Texture.hpp @@ -32,8 +32,6 @@ using namespace std; class TextureRes { private: - static vector list; - GLuint id; string filename; bool hasMipmap;