<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/108370/">http://git.reviewboard.kde.org/r/108370/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">From a code pov looks good, just two small things.
Then I'd say lets merge this into master.</pre>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/108370/diff/1/?file=106865#file106865line112" style="color: black; font-weight: bold; text-decoration: underline;">language/duchain/types/abstracttype.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">uint AbstractType::hash() const</pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">111</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">uint</span> <span class="n">AbstractType</span><span class="o">::</span><span class="n">hash</span><span class="p">()</span> <span class="k">const</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">112</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">uint</span> <span class="n">AbstractType</span><span class="o">::</span><span class="n">hash</span><span class="p">()</span> <span class="k">const</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">as mentioned on IRC:
make ::hash non-virtual and instead introduce a protected KDevHash hash_impl() virtual const to ensure KDevHash::finalize is only called once.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/108370/diff/1/?file=106879#file106879line34" style="color: black; font-weight: bold; text-decoration: underline;">util/kdevhash.h</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">34</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">_data</span> <span class="o">=</span> <span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span><span class="p">)</span><span class="o">&</span><span class="n">addition</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'd use an explicit c++ reinterpret_cast here.</pre>
</div>
<br />
<p>- Milian</p>
<br />
<p>On January 12th, 2013, 3:48 p.m. UTC, Olivier Jean de Gaalon wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop.</div>
<div>By Olivier Jean de Gaalon.</div>
<p style="color: grey;"><i>Updated Jan. 12, 2013, 3:48 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Implement a generic hash function (minor variation of one-at-a-time) which can be used to hash the data of item repository data classes.
The good:
Removes around 80% of bucket clashes and 100% of actually equal hashes for different types in the real-world C++ cases I've tested.
No need to pull numbers out of a hat and hope you didn't clash.
The bad:
The hash function is more expensive, and so might cancel out the gains in speed, at least in smaller projects (hard to create a real-world benchmark that can show the difference)
The meh:
Either way it makes no visually discernable difference, so it should probably be seen from an ease-of-use perspective.
I've had this sitting around for a while, but here it is for reviewer's pleasure.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>language/duchain/declarationid.h <span style="color: grey">(7caccf5)</span></li>
<li>language/duchain/identifier.cpp <span style="color: grey">(4cfc90e)</span></li>
<li>language/duchain/indexeddeclaration.h <span style="color: grey">(6f486ab)</span></li>
<li>language/duchain/indexedducontext.h <span style="color: grey">(d972202)</span></li>
<li>language/duchain/instantiationinformation.cpp <span style="color: grey">(dbc236d)</span></li>
<li>language/duchain/referencecounting.cpp <span style="color: grey">(a4dece2)</span></li>
<li>language/duchain/types/abstracttype.cpp <span style="color: grey">(e7f7d99)</span></li>
<li>language/duchain/types/arraytype.cpp <span style="color: grey">(673f691)</span></li>
<li>language/duchain/types/constantintegraltype.cpp <span style="color: grey">(4cb8a36)</span></li>
<li>language/duchain/types/delayedtype.cpp <span style="color: grey">(5506a45)</span></li>
<li>language/duchain/types/enumerationtype.cpp <span style="color: grey">(4901136)</span></li>
<li>language/duchain/types/enumeratortype.cpp <span style="color: grey">(a3d3ab6)</span></li>
<li>language/duchain/types/functiontype.cpp <span style="color: grey">(bc6b842)</span></li>
<li>language/duchain/types/integraltype.cpp <span style="color: grey">(f40f05b)</span></li>
<li>language/duchain/types/pointertype.cpp <span style="color: grey">(fbb2143)</span></li>
<li>language/duchain/types/referencetype.cpp <span style="color: grey">(8919f7f)</span></li>
<li>language/duchain/types/structuretype.cpp <span style="color: grey">(27b0088)</span></li>
<li>language/duchain/types/typealiastype.cpp <span style="color: grey">(903e2e1)</span></li>
<li>language/duchain/types/unsuretype.cpp <span style="color: grey">(cba3984)</span></li>
<li>util/CMakeLists.txt <span style="color: grey">(29de126)</span></li>
<li>util/kdevhash.h <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/108370/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<ul>
<li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/01/12/duchainifywithitemrepositorystats.diff">Patch to make duchainify show itemrepository stats</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>