<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127131/">https://git.reviewboard.kde.org/r/127131/</a>
     </td>
    </tr>
   </table>
   <br />



<p>

Fix it, then Ship it!

</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Looked good to me (so marking as +1) though I do have a suggested improvement.</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="https://git.reviewboard.kde.org/r/127131/diff/1/?file=444806#file444806line304" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/jobs/kjob.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">304</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">d</span><span class="o">-></span><span class="n">percentage</span> <span class="o">=</span> <span class="p"><span class="hl">(</span></span><span class="kt">unsigned</span> <span class="kt">long</span><span class="p"><span class="hl">)(</span>((</span><span class="kt">float</span><span class="p"><span class="hl">)</span>(</span><span class="n">processedAmount</span><span class="p">)</span> <span class="o">/</span> <span class="p"><span class="hl">(</span></span><span class="kt">float</span><span class="p"><span class="hl">)</span>(</span><span class="n">totalAmount</span><span class="p">))</span> <span class="o">*</span> <span class="mf">100.0</span><span class="p">);</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">302</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">d</span><span class="o">-></span><span class="n">percentage</span> <span class="o">=</span> <span class="k"><span class="hl">static_cast</span></span><span class="o"><span class="hl"><</span></span><span class="kt">unsigned</span> <span class="kt">long</span><span class="o"><span class="hl">></span></span><span class="p">((</span><span class="kt">float</span><span class="p">(</span><span class="n">processedAmount</span><span class="p">)</span> <span class="o">/</span> <span class="kt">float</span><span class="p">(</span><span class="n">totalAmount</span><span class="p">))</span> <span class="o">*</span> <span class="mf">100.0</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Since you're here anyways, probably best to redo the right-hand side to something like <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">100.0 * processedAmount / totalAmount</code>.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The cast to float is incomplete since the compiler still has to upcast to double (for 100.0, which should be 100.0f to be treated as a float), and moving the 100.0 to the beginning will force the rest of the expression to be treated as a double anyways.</p></pre>
 </div>
</div>
<br />



<p>- Michael Pyne</p>


<br />
<p>On February 21st, 2016, 10:30 a.m. UTC, David Faure wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Frameworks and Michael Pyne.</div>
<div>By David Faure.</div>


<p style="color: grey;"><i>Updated Feb. 21, 2016, 10:30 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kcoreaddons
</div>


<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;">(C casts, global functions without static, unused default statements...)

This detected a small bug in kdirwatch, where fall-through was unintended
(I know, because I wrote that code).</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Compiled with clang; ran autotests.</p></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>autotests/kjobtest.cpp <span style="color: grey">(aedde39f35ec7bafeb13ffd33d8eb871f60b29eb)</span></li>

 <li>autotests/kprocesstest.cpp <span style="color: grey">(2ac756c973b12b895af6fa34ff5077d2d064af8b)</span></li>

 <li>src/desktoptojson/main.cpp <span style="color: grey">(45bdcba8f5e7ab395f52ebf8d31ccde826e77434)</span></li>

 <li>src/lib/caching/kshareddatacache.cpp <span style="color: grey">(0c1c61cc7f70969748d102c8313fadc73cef55a5)</span></li>

 <li>src/lib/io/kautosavefile.cpp <span style="color: grey">(e540630179b17b18b7dce5480969aab89d45be34)</span></li>

 <li>src/lib/io/kdirwatch.cpp <span style="color: grey">(4b900228c74c609d26e52542bd42e124c6d1d39b)</span></li>

 <li>src/lib/io/kdirwatch_p.h <span style="color: grey">(af74ff15869b6f9c16bb14f81b6c488dd082de19)</span></li>

 <li>src/lib/io/kfilesystemtype.cpp <span style="color: grey">(3526de8ab710f31dabad09026b9b993785658033)</span></li>

 <li>src/lib/io/kmessage.h <span style="color: grey">(590a1fe961a220bb2e879b35b4936bf9a1cdfdbb)</span></li>

 <li>src/lib/io/kprocess.cpp <span style="color: grey">(2bd8aee1293adf3b5fe549fa2cff675160a5ea96)</span></li>

 <li>src/lib/jobs/kjob.cpp <span style="color: grey">(1ad2c2858ee7ed2167a740a10fb7b185d8833288)</span></li>

 <li>src/lib/kaboutdata.cpp <span style="color: grey">(3193808797c53586bea94768dc81867e35a8a535)</span></li>

 <li>src/lib/plugin/desktopfileparser.cpp <span style="color: grey">(1122af8ba3640a7f06819063157069b652a4f904)</span></li>

 <li>src/lib/plugin/desktopfileparser_p.h <span style="color: grey">(f19be800e5af2cc120a8ad4f9561e92dbf9fd2c7)</span></li>

 <li>src/lib/plugin/kpluginloader.cpp <span style="color: grey">(530e7b865022b680a473fceceb7d659196e9420d)</span></li>

 <li>src/lib/randomness/krandom.cpp <span style="color: grey">(93b917d23c2ab8ec7a10277ea8bd49d6f9a61fd7)</span></li>

 <li>src/lib/randomness/krandomsequence.cpp <span style="color: grey">(01490bfac5e5fda0ba509fb791bdd1e791f90cbd)</span></li>

 <li>src/lib/text/kmacroexpander_unix.cpp <span style="color: grey">(f773291ffe961c1a01235eb6eaf79488461eac59)</span></li>

 <li>src/lib/text/ktexttohtml.cpp <span style="color: grey">(0fe2a2d69de1d42341cb3ad50c236c21c0aa1f06)</span></li>

 <li>src/lib/text/ktexttohtmlemoticonsinterface.h <span style="color: grey">(8fcd30f6c93424aeb103243a0e080798a56fdcc1)</span></li>

 <li>src/lib/util/kformatprivate.cpp <span style="color: grey">(9af072dcf3068d8056582be046e38bab48a548a5)</span></li>

 <li>src/lib/util/kshell.cpp <span style="color: grey">(0f2e1d46e0761320b871949da594a9b60e2feaf5)</span></li>

 <li>src/lib/util/kuser_unix.cpp <span style="color: grey">(01120f6928e04682ca11c0a0822047b43c2f047b)</span></li>

</ul>

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






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







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