From 0dfbd34b09101dfb1535dabed0563c2b30e01688 Mon Sep 17 00:00:00 2001 From: matto Date: Tue, 6 Oct 2015 07:21:13 -0400 Subject: [PATCH] Fixing Andriod build (possibly, cannot test) http://www.cplusplus.com/reference/list/list/erase/ cplusplus.com says that std::list::erase takes arguments of const_iterator, but from build errors the Andriod runtime says it takes non const iterators. gcc doesn't mind removing the constness and it's not so important that they're const, so I'm removing them. --- src/Textures.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Textures.cpp b/src/Textures.cpp index 313753d5..300fe9e8 100644 --- a/src/Textures.cpp +++ b/src/Textures.cpp @@ -524,15 +524,15 @@ void TextureCache::_checkCacheSize() if (m_cachedBytes <= m_maxBytes) return; - Textures::const_iterator iter = m_textures.cend(); + Textures::iterator iter = m_textures.end(); do { --iter; - const CachedTexture& tex = *iter; + CachedTexture& tex = *iter; m_cachedBytes -= tex.textureBytes; glDeleteTextures(1, &tex.glName); m_lruTextureLocations.erase(tex.crc); } while (m_cachedBytes > m_maxBytes && iter != m_textures.cbegin()); - m_textures.erase(iter, m_textures.cend()); + m_textures.erase(iter, m_textures.end()); } CachedTexture * TextureCache::_addTexture(u32 _crc32)