<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Hugo,</p>
<p>On 2017-04-12 10:14, Hugo Beauzée-Luyssen wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> On Tue, Apr 11, 2017, at 11:39 PM, victorien.lecouviour.tuffet@gmail.com
wrote:</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> \
+ assert((maxval) >= 0);
\
data_t *restrict p_src = (data_t *)p_pic->p[Y_PLANE].p_pixels;
\
data_t *restrict p_out = (data_t
*)p_outpic->p[Y_PLANE].p_pixels; \
const unsigned data_sz = sizeof(data_t);
\</code></pre>
</blockquote>
<pre><code> static_assert seems like a better choice here</code></pre>
</blockquote>
<p>The current usage only involves <em>constant-expressions</em>, but the macro itself does not restrict itself to such (as <code>maxval</code> of course doesn’t have to be a <em>constant-expression</em> for things to work as they should).</p>
<p>For what it’s worth; I vote keeping the <code>assert</code>.</p>
</body>
</html>