Implement LayerImage::getCel() in terms of LayerImage::getCel() const.

This commit is contained in:
David Capello 2011-03-26 18:49:29 -03:00
parent 3e8e3b397a
commit a524fae9ba

View File

@ -193,16 +193,7 @@ const Cel* LayerImage::getCel(int frame) const
Cel* LayerImage::getCel(int frame)
{
CelIterator it = getCelBegin();
CelIterator end = getCelEnd();
for (; it != end; ++it) {
Cel* cel = *it;
if (cel->frame == frame)
return cel;
}
return NULL;
return const_cast<Cel*>(static_cast<const LayerImage*>(this)->getCel(frame));
}
/**