Skip to content

Commit

Permalink
booru/image: Avoid explicit cast by not using auto
Browse files Browse the repository at this point in the history
  • Loading branch information
ahodesuka committed Dec 3, 2017
1 parent ceeaed6 commit d089850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/booru/image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ void Image::on_area_updated(int, int, int, int)
// A better solution might be to have a drawn signal or flag and check that
// but knowing for sure when gtk draws something seems impossible
Glib::RefPtr<Gdk::Pixbuf> p = m_Loader->get_pixbuf();
auto ms = std::min(std::max((p->get_width() + p->get_height()) / 60.f, 100.f), 800.f);
if (!m_Curler.is_cancelled() && steady_clock::now() >= m_LastDraw + milliseconds(static_cast<int>(ms)))
int ms = std::min(std::max((p->get_width() + p->get_height()) / 60.f, 100.f), 800.f);
if (!m_Curler.is_cancelled() && steady_clock::now() >= m_LastDraw + milliseconds(ms))
{
m_SignalPixbufChanged();
m_LastDraw = steady_clock::now();
Expand Down

0 comments on commit d089850

Please sign in to comment.