<!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 j-b,</p>
<p>Resending this message (a little revised) as I accidentally replied to you personally, and not <code>vlc-devel</code>.</p>
<p>On 2017-02-23 15:00, Jean-Baptiste Kempf wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Hello,

 On Thu, 23 Feb 2017, at 14:54, Filip Roséen wrote:</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> -        objects.append(VLC_OBJECT(object)); \
 +        objects.append(object ? VLC_OBJECT(object) : NULL); \</code></pre>
</blockquote>
<pre><code> Why is that better than
 if (object) objects.append ?</code></pre>
</blockquote>
<p>Because there is an invisible relationship between the variables named <code>objects</code>, and <code>varnames</code> (where <code>varnames[i]</code> and <code>objects[i]</code> belong together).</p>
<p>This should be refactored in the future to use a container with <code>std::pair<T1,T2></code> or <code>QPair<T1,T2></code> - though I just wanted to fix the immediate issue now (as the refactor would be quite intrusive).</p>
<p>Best Regards, Filip</p>
</body>
</html>