Sfoglia il codice sorgente

Removed unused debug data in CAnimation.

AlexVinS 9 anni fa
parent
commit
e6829bf271
2 ha cambiato i file con 1 aggiunte e 22 eliminazioni
  1. 1 18
      client/gui/CAnimation.cpp
  2. 0 4
      client/gui/CAnimation.h

+ 1 - 18
client/gui/CAnimation.cpp

@@ -1065,7 +1065,6 @@ CAnimation::CAnimation(std::string Name, bool Compressed):
 	CDefFile * file = getFile();
 	init(file);
 	delete file;
-	loadedAnims.insert(this);
 }
 
 CAnimation::CAnimation():
@@ -1073,19 +1072,17 @@ CAnimation::CAnimation():
 	compressed(false)
 {
 	init(nullptr);
-	loadedAnims.insert(this);
 }
 
 CAnimation::~CAnimation()
 {
 	if (!images.empty())
 	{
-		logGlobal->warnStream()<<"Warning: not all frames were unloaded from "<<name;
+		//logGlobal->warnStream()<<"Warning: not all frames were unloaded from "<<name;
 		for (auto & elem : images)
 			for (auto & _image : elem.second)
 				delete _image.second;
 	}
-	loadedAnims.erase(this);
 }
 
 void CAnimation::setCustom(std::string filename, size_t frame, size_t group)
@@ -1167,20 +1164,6 @@ size_t CAnimation::size(size_t group) const
 	return 0;
 }
 
-std::set<CAnimation*> CAnimation::loadedAnims;
-
-void CAnimation::getAnimInfo()
-{
-	logGlobal->errorStream() << "Animation stats: Loaded " << loadedAnims.size() << " total";
-	for(auto anim : loadedAnims)
-	{
-		logGlobal->errorStream() << "Name: " << anim->name << " Groups: " << anim->images.size();
-		if(!anim->images.empty())
-			logGlobal->errorStream() << ", " << anim->images.begin()->second.size() << " image loaded in group " << anim->images.begin()->first;
-	}
-}
-
-
 float CFadeAnimation::initialCounter() const
 {
 	if (fadingMode == EMode::OUT)

+ 0 - 4
client/gui/CAnimation.h

@@ -195,10 +195,6 @@ public:
 	CAnimation();
 	~CAnimation();
 
-    //static method for debugging - print info about loaded animations
-	static void getAnimInfo();
-	static std::set<CAnimation*> loadedAnims;
-
 	//add custom surface to the selected position.
 	void setCustom(std::string filename, size_t frame, size_t group=0);