<html><head></head><body>There were also no needs for static mutex, list head, you-name-it initialization... Until there were.<br>
<br>
There are no technical reasons why we cannot make it a both constant-preserving and expansion-safe macro... Therefore we should make it constant-preserving and expansion-safe.<br><br><div class="gmail_quote">Le 18 juin 2018 09:48:23 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2018-06-16 10:56 AM, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Le perjantaina 15. kesäkuuta 2018, 18.09.16 EEST Steve Lhomme a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> ---<br>   include/vlc_common.h | 8 ++++++++<br>   1 file changed, 8 insertions(+)<br><br> diff --git a/include/vlc_common.h b/include/vlc_common.h<br> index 3191d3ce4c8..8b4baffcf27 100644<br> --- a/include/vlc_common.h<br> +++ b/include/vlc_common.h<br> @@ -316,6 +316,14 @@ static inline int64_t milli_from_vtick(mtime_t mt)<br>       return mt / (CLOCK_FREQ / 1000);<br>   }<br><br> +static inline int64_t micro_from_vtick(mtime_t mt)<br> +{<br> +    return mt * INT64_C(1000000) / CLOCK_FREQ;<br> +}<br> +static inline mtime_t vtick_from_micro(int64_t micro)<br> +{<br> +    return micro * CLOCK_FREQ / INT64_C(1000000);<br> +}<br>   static inline mtime_t vtick_from_nano(int64_t nano)<br>   {<br>       return nano / (INT64_C(1000000000) / CLOCK_FREQ);<br></blockquote> Use macros to preserve constants.<br></blockquote><br>There are no cases where the conversion happens on a constant. See other <br>thread about macros vs functions for these conversions.<br><hr><br>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>