Web lists-archives.com

Re: Review Request 129378: [baloo] Avoid some useless copies by using const references instead

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

On November 11th, 2016, 11:42 nachm. UTC, 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

On November 11th, 2016, 4:58 nachm. UTC, Christian Ehrlicher wrote:

Review request for Baloo.
By Christian Ehrlicher.

Updated Nov. 11, 2016, 4:58 nachm.

Repository: baloo


No functional changes, just adding some const & to avoid copies where possible.


  • 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)

View Diff