On Sun, Feb 5, 2012 at 4:49 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div></div><div class="h5">Jakob Stoklund Olesen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Feb 5, 2012, at 4:31 PM, Talin wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Patch to refactor the hashing functions for the constant unique map, to avoid code duplication.<br>
</blockquote>
<br>
Wouldn't it give nicer code if you kept the intermediate state as a class member?<br>
<br>
Something like:<br>
<br>
IncrementalHash Hash<br>
Hash.add(foo);<br>
Hahs.add(bar);<br>
return Hash.finish();<br>
</blockquote>
<br></div></div>
You mean, FoldingSetNodeID? :)<br></blockquote><div><br></div><div>No - FoldingSetNodeID keeps a vector of all of the values. This just computes the hash only. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<font color="#888888">
<br>
Nick<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>-- Talin<br>