vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed May 2 18:57:00 2018 +0300| [e3eddd4f7aad3293fd073a1a2e514629d15780e5] | committer: Rémi Denis-Courmont
mtime: remove LAST_MDATE Almost every existing use cases uses INT64_MAX directly already. Also, the signedness was wrong. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e3eddd4f7aad3293fd073a1a2e514629d15780e5 --- include/vlc_mtime.h | 10 ---------- modules/control/dbus/dbus.c | 4 ++-- modules/gui/skins2/x11/x11_timer.cpp | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/include/vlc_mtime.h b/include/vlc_mtime.h index ae07f6f126..d6f9ab8a85 100644 --- a/include/vlc_mtime.h +++ b/include/vlc_mtime.h @@ -33,16 +33,6 @@ # define __VLC_MTIME_H 1 /***************************************************************************** - * LAST_MDATE: date which will never happen - ***************************************************************************** - * This date can be used as a 'never' date, to mark missing events in a function - * supposed to return a date, such as nothing to display in a function - * returning the date of the first image to be displayed. It can be used in - * comparaison with other values: all existing dates will be earlier. - *****************************************************************************/ -#define LAST_MDATE ((mtime_t)((uint64_t)(-1)/2)) - -/***************************************************************************** * MSTRTIME_MAX_SIZE: maximum possible size of mstrtime ***************************************************************************** * This values is the maximal possible size of the string returned by the diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c index 77923daa02..bf3431821e 100644 --- a/modules/control/dbus/dbus.c +++ b/modules/control/dbus/dbus.c @@ -384,7 +384,7 @@ static void toggle_timeout(DBusTimeout *to, void *data) static int next_timeout(intf_thread_t *intf) { intf_sys_t *sys = intf->p_sys; - mtime_t next_timeout = LAST_MDATE; + mtime_t next_timeout = INT64_MAX; unsigned count = vlc_array_count(&sys->timeouts); for (unsigned i = 0; i < count; i++) @@ -400,7 +400,7 @@ static int next_timeout(intf_thread_t *intf) next_timeout = *expiry; } - if (next_timeout >= LAST_MDATE) + if (next_timeout >= INT64_MAX) return -1; next_timeout /= 1000; diff --git a/modules/gui/skins2/x11/x11_timer.cpp b/modules/gui/skins2/x11/x11_timer.cpp index 87280baab9..f281b7a289 100644 --- a/modules/gui/skins2/x11/x11_timer.cpp +++ b/modules/gui/skins2/x11/x11_timer.cpp @@ -104,7 +104,7 @@ void X11TimerLoop::removeTimer( X11Timer &rTimer ) void X11TimerLoop::waitNextTimer() { mtime_t curDate = mdate(); - mtime_t nextDate = LAST_MDATE; + mtime_t nextDate = INT64_MAX; X11Timer *nextTimer = NULL; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
