<div dir="ltr">The idea behind this was to remove integer-type additions with bool variables. It likely works for all known cases, but would make the code cleaner. <br><div><div id="__tbSetup"></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Sep 17, 2013 at 4:54 PM, Derek Buitenhuis <span dir="ltr"><<a href="mailto:derek.buitenhuis@gmail.com" target="_blank">derek.buitenhuis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 9/17/2013 11:52 AM, <a href="mailto:deepthi@multicorewareinc.com">deepthi@multicorewareinc.com</a> wrote:<br>
> # HG changeset patch<br>
> # User Deepthi Nandakumar <<a href="mailto:deepthi@multicorewareinc.com">deepthi@multicorewareinc.com</a>><br>
> # Date 1379415109 -19800<br>
> # Node ID defa0cb72646c483e7708e3f40a608e4be250818<br>
> # Parent  0d33ff236f68bc2238138a7213301b2efc0e6426<br>
> lookahead: change const bool to const int, so can be used safely in loop counter.<br>
<br>
</div>I'm not sure what the intended use is? Something a cast can't fix?<br>
<div class="im"><br>
> -    const bool bBidir = (b < p1);<br>
> +    const int bBidir = (b < p1) ? 1 : 0;<br>
<br>
</div>You don't need a branch here. (b < p1) will evaluate to 0 or 1,<br>
since C++ is only weakly statically typed.<br>
<div class="im"><br>
> -    if (!bBidir)<br>
> +    if (bBidir == 0)<br>
<br>
</div>This isn't necessary, but it may be the convention in the codebase?<br>
<br>
- Derek<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>