forked from qt-creator/qt-creator
CppEditor: Pass function by reference
Coverity-Id: 1572606 Change-Id: Ia25fe956ebace7e77412971d7834ce63f236f729 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
27055e4c39
commit
0da6fe6890
@@ -79,12 +79,12 @@ static int skipChars(QTextCursor *tc,
|
||||
return count;
|
||||
}
|
||||
|
||||
static int skipCharsForward(QTextCursor *tc, std::function<bool(const QChar &)> skip)
|
||||
static int skipCharsForward(QTextCursor *tc, const std::function<bool(const QChar &)> &skip)
|
||||
{
|
||||
return skipChars(tc, QTextCursor::NextCharacter, 0, skip);
|
||||
}
|
||||
|
||||
static int skipCharsBackward(QTextCursor *tc, std::function<bool(const QChar &)> skip)
|
||||
static int skipCharsBackward(QTextCursor *tc, const std::function<bool(const QChar &)> &skip)
|
||||
{
|
||||
return skipChars(tc, QTextCursor::PreviousCharacter, -1, skip);
|
||||
}
|
||||
|
Reference in New Issue
Block a user