Commit 7155cebc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mtime: inline date_Get() and date_Set()

Avoid trivial functions located in separate libraries.
Since the layout of date_t is public anyway, this costs nothing.
parent e3eddd4f
......@@ -88,7 +88,11 @@ VLC_API void date_Change(date_t *restrict date, uint32_t num, uint32_t den);
* \param date date to set the timestamp into
* \param value date value
*/
VLC_API void date_Set(date_t *restrict date, mtime_t value);
static inline void date_Set(date_t *restrict date, mtime_t value)
{
date->date = value;
date->i_remainder = 0;
}
/**
* Gets the current timestamp from a date_t.
......@@ -96,7 +100,10 @@ VLC_API void date_Set(date_t *restrict date, mtime_t value);
* \param date date to fetch the timestamp from
* \return date value
*/
VLC_API mtime_t date_Get(const date_t *restrict date) VLC_USED;
VLC_USED static inline mtime_t date_Get(const date_t *restrict date)
{
return date->date;
}
/**
* Increments a date.
......
......@@ -69,10 +69,8 @@ config_StringEscape
config_StringUnescape
date_Change
date_Decrement
date_Get
date_Increment
date_Init
date_Set
decoder_AbortPictures
decoder_GetDisplayDate
decoder_GetDisplayRate
......
......@@ -92,17 +92,6 @@ void date_Change( date_t *p_date, uint32_t i_divider_n, uint32_t i_divider_d )
p_date->i_divider_den = i_divider_d;
}
void date_Set( date_t *p_date, mtime_t i_new_date )
{
p_date->date = i_new_date;
p_date->i_remainder = 0;
}
mtime_t date_Get( const date_t *p_date )
{
return p_date->date;
}
mtime_t date_Increment( date_t *p_date, uint32_t i_nb_samples )
{
assert( p_date->i_divider_num != 0 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment