[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Review Request 129378: [baloo] Avoid some useless copies by using const references instead
From:       Christian Ehrlicher <ch.ehrlicher () gmx ! de>
Date:       2016-11-12 7:12:37
Message-ID: 20161112071237.6207.25896 () mimi ! kde ! org
[Download RAW message or body]

--===============8942491322287353822==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> On Nov. 11, 2016, 11:42 nachm., Aleix Pol Gonzalez wrote:
> > I don't think this is saving anything, the move constructor should be taking care \
> > of it. http://en.cppreference.com/w/cpp/language/move_constructor

I'm sorry but where do you see move ctors here in the first place? it.next() is \
returning a simple const ref which must not be modified. How should this data moved \
from this const iterator to the local object?


- Christian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129378/#review100797
-----------------------------------------------------------


On Nov. 11, 2016, 4:58 nachm., Christian Ehrlicher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129378/
> -----------------------------------------------------------
> 
> (Updated Nov. 11, 2016, 4:58 nachm.)
> 
> 
> Review request for Baloo.
> 
> 
> Repository: baloo
> 
> 
> Description
> -------
> 
> No functional changes, just adding some const & to avoid copies where possible.
> 
> 
> Diffs
> -----
> 
> src/engine/transaction.cpp a1e4fe3 
> src/engine/writetransaction.cpp 171f5ba 
> src/file/fileindexscheduler.cpp d50f2be 
> src/file/pendingfilequeue.cpp 685bf9e 
> tests/engine/basicindexingtest.cpp 1db4d15 
> 
> Diff: https://git.reviewboard.kde.org/r/129378/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Christian Ehrlicher
> 
> 


--===============8942491322287353822==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On November 11th, 2016, 11:42 nachm. UTC, <b>Aleix \
Pol Gonzalez</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I don't think this is saving anything, the move \
constructor should be taking care of it. \
http://en.cppreference.com/w/cpp/language/move_constructor</p></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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'm \
sorry but where do you see move ctors here in the first place? it.next() is returning \
a simple const ref which must not be modified. How should this data moved from this \
const iterator to the local object?</p></pre> <br />










<p>- Christian</p>


<br />
<p>On November 11th, 2016, 4:58 nachm. UTC, Christian Ehrlicher 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 Baloo.</div>
<div>By Christian Ehrlicher.</div>


<p style="color: grey;"><i>Updated Nov. 11, 2016, 4:58 nachm.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
baloo
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">No functional changes, just adding some const &amp; to \
avoid copies where possible.</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>src/engine/transaction.cpp <span style="color: grey">(a1e4fe3)</span></li>

 <li>src/engine/writetransaction.cpp <span style="color: grey">(171f5ba)</span></li>

 <li>src/file/fileindexscheduler.cpp <span style="color: grey">(d50f2be)</span></li>

 <li>src/file/pendingfilequeue.cpp <span style="color: grey">(685bf9e)</span></li>

 <li>tests/engine/basicindexingtest.cpp <span style="color: \
grey">(1db4d15)</span></li>

</ul>

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






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







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


--===============8942491322287353822==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic