<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/101722/">http://git.reviewboard.kde.org/r/101722/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 24th, 2011, 11:51 a.m., <b>David Nolden</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hmm, this is extremely slow, the problem is the hasDeclarationUse function which iterates through all contexts. This is too slow for the way the function is supposed to be used, we need to find a better way.</pre>
 </blockquote>




 <p>On June 24th, 2011, 11:53 a.m., <b>David Nolden</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Btw. I also don't like that the "hasLocalUse" etc. variables have been renamed to a meaningless "ret", why didn't you leave the variable-names alive? They make the code easier to understand.</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes it's slow. If you have any idea how to make it work without looking them up, please tell me.

Regarding the ret, it's so that the code doesn't check every time  if it's in other contexts if it has been found already.</pre>
<br />








<p>- Aleix</p>


<br />
<p>On June 22nd, 2011, 2:39 a.m., Aleix Pol Gonzalez wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDevelop.</div>
<div>By Aleix Pol Gonzalez.</div>


<p style="color: grey;"><i>Updated June 22, 2011, 2:39 a.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;">In cases like the following didn't return false, even though 'a' is not being used:

int f()
{
  QByteArray a;
}

One would expect it to be a fast equivalent of !Declaration::uses().isEmpty(), but the result wasn't the same.
This change is also removing some calls in DUChain::uses()->hasUses (in case there's already a use in the local context) which I guess it's useful as well.

I'm putting this on review because I'm not sure the correct way to fix it is checking if it's <0.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">I've played with some code with some scripts from my thesis.</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/declaration.cpp <span style="color: grey">(b3a7700)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/101722/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>