1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Removed unused debug data in CAnimation.

This commit is contained in:
AlexVinS 2016-10-16 12:02:50 +03:00
parent a0300b0447
commit e6829bf271
2 changed files with 1 additions and 22 deletions

View File

@ -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)

View File

@ -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);