1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-07 00:58:39 +02:00
- fixed some warnings from cppcheck
This commit is contained in:
Ivan Savenko
2012-09-26 13:13:39 +00:00
parent 7759ed017e
commit 15a7f43e11
31 changed files with 134 additions and 198 deletions

View File

@ -434,12 +434,12 @@ void CAdventureMapButton::setPlayerColor(int player)
image->playerColored(player);
}
void CAdventureMapButton::showAll(SDL_Surface * to)
void CAdventureMapButton::show(SDL_Surface * to)
{
CIntObject::showAll(to);
CIntObject::show(to);
if (borderEnabled && borderColor.unused == 0)
CSDL_Ext::drawBorder(to, pos.x - 1, pos.y - 1, pos.w + 2, pos.h + 2, int3(borderColor.r, borderColor.g, borderColor.b));
CSDL_Ext::drawBorder(to, pos.x, pos.y, pos.w, pos.h, int3(borderColor.r, borderColor.g, borderColor.b));
}
void CHighlightableButton::select(bool on)
@ -1761,14 +1761,14 @@ void CWindowObject::updateShadow()
void CWindowObject::setShadow(bool on)
{
vstd::clear_pointer(shadow);
//size of shadow
static const int size = 8;
if (on == bool(shadow))
return;
vstd::clear_pointer(shadow);
//object too small to cast shadow
if (pos.h <= size || pos.w <= size)
return;