Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 91c4b4c3 authored by Nicolas Carion's avatar Nicolas Carion

make parameter const ref

parent 2544c1e3
......@@ -341,7 +341,7 @@ bool GroupsModel::mergeSingleGroups(int id, Fun &undo, Fun &redo)
return true;
}
bool GroupsModel::split(int id, std::function<bool(int)> criterion, Fun &undo, Fun &redo)
bool GroupsModel::split(int id, const std::function<bool(int)> &criterion, Fun &undo, Fun &redo)
{
QWriteLocker locker(&m_lock);
// This function is valid only for roots (otherwise it is not clear what should be the new parent of the created tree)
......
......@@ -90,7 +90,7 @@ public:
Both tree are subsequently simplified to avoid weird structure.
@param id is the root of the tree
*/
bool split(int id, std::function<bool(int)> criterion, Fun &undo, Fun &redo);
bool split(int id, const std::function<bool(int)> &criterion, Fun &undo, Fun &redo);
/* @brief Get the overall father of a given groupItem
If the element has no father, it is returned as is.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment