From 5f800279acd71bb58ac42742ea090cd1cc26dbfa Mon Sep 17 00:00:00 2001 From: elsid Date: Tue, 19 Jul 2022 22:40:34 +0200 Subject: [PATCH] Remove unused Gui::FontLoader::mTextures --- components/fontloader/fontloader.cpp | 13 ------------- components/fontloader/fontloader.hpp | 1 - 2 files changed, 14 deletions(-) diff --git a/components/fontloader/fontloader.cpp b/components/fontloader/fontloader.cpp index ffa1593318..5b0381f180 100644 --- a/components/fontloader/fontloader.cpp +++ b/components/fontloader/fontloader.cpp @@ -177,10 +177,6 @@ namespace Gui Log(Debug::Error) << "Error in the FontLoader destructor: " << e.what(); } - for (std::vector::iterator it = mTextures.begin(); it != mTextures.end(); ++it) - delete *it; - mTextures.clear(); - for (std::vector::iterator it = mFonts.begin(); it != mFonts.end(); ++it) { try @@ -318,15 +314,6 @@ namespace Gui memcpy(texData, &textureData[0], textureData.size()); tex->unlock(); - // Using ResourceManualFont::setTexture, enable for MyGUI 3.2.3 - /* - osg::ref_ptr texture = new osg::Texture2D; - texture->setImage(image); - osgMyGUI::OSGTexture* myguiTex = new osgMyGUI::OSGTexture(texture); - mTextures.push_back(myguiTex); - font->setTexture(myguiTex); - */ - // We need to emulate loading from XML because the data members are private as of mygui 3.2.0 MyGUI::xml::Document xmlDocument; MyGUI::xml::ElementPtr root = xmlDocument.createRoot("ResourceManualFont"); diff --git a/components/fontloader/fontloader.hpp b/components/fontloader/fontloader.hpp index 1f1137614e..f95c135025 100644 --- a/components/fontloader/fontloader.hpp +++ b/components/fontloader/fontloader.hpp @@ -43,7 +43,6 @@ namespace Gui int mFontHeight; float mScalingFactor; - std::vector mTextures; std::vector mFonts; std::string getInternalFontName(const std::string& name);