forked from enlightenment/efl
efl_ui_image : Avoid integral division
Summary: Assigning a result of integral division to a double type variable is not useful for division calculation. Test Plan: N/A Reviewers: Hermet, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11344
This commit is contained in:
parent
3ce052d9ec
commit
2ba77c0a33
|
@ -1860,7 +1860,7 @@ _efl_ui_image_efl_player_playback_progress_get(const Eo *obj EINA_UNUSED, Efl_Ui
|
|||
if (sd->edje)
|
||||
efl_player_playback_progress_get(sd->img);
|
||||
else if (sd->frame_count > 1)
|
||||
return sd->cur_frame / (sd->frame_count - 1);
|
||||
return (double)sd->cur_frame / ((double)sd->frame_count - 1.0);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3153,7 +3153,7 @@ _efl_ui_image_zoomable_efl_player_playback_progress_get(const Eo *obj EINA_UNUSE
|
|||
if (sd->edje)
|
||||
efl_player_playback_progress_get(sd->edje);
|
||||
else if (sd->frame_count > 1)
|
||||
return sd->cur_frame / (sd->frame_count - 1);
|
||||
return (double)sd->cur_frame / ((double)sd->frame_count - 1.0);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue