Remove a useless cast.

Detected by the upcoming gcc-4.8.
This commit is contained in:
Mark de Wever 2012-08-25 16:15:17 +00:00
parent a3a25dbea3
commit fb47d9011f

View file

@ -127,8 +127,7 @@ SDL_Rect slider::slider_area() const
if (image_.null() || image_->w >= loc.w)
return default_value;
int xpos = loc.x + (value_ - min_) *
static_cast<int>(loc.w - image_->w) / (max_ - min_);
int xpos = loc.x + (value_ - min_) * (loc.w - image_->w) / (max_ - min_);
return create_rect(xpos, loc.y, image_->w, image_->h);
}