Don't pass QChar as const & since it's just a unsigned short

Reviewed-by: ogoffart
This commit is contained in:
Thorbjørn Lindeijer
2010-06-14 16:06:42 +02:00
parent 7d4bbf4934
commit 6875a50d27
11 changed files with 26 additions and 26 deletions

View File

@@ -38,7 +38,7 @@ using namespace CPlusPlus;
enum { MAX_NUM_LINES = 20 };
static bool shouldOverrideChar(const QChar &ch)
static bool shouldOverrideChar(QChar ch)
{
switch (ch.unicode()) {
case ')': case ']': case ';': case '"': case '\'':
@@ -84,7 +84,7 @@ bool MatchingText::shouldInsertMatchingText(const QTextCursor &tc)
return shouldInsertMatchingText(doc->characterAt(tc.selectionEnd()));
}
bool MatchingText::shouldInsertMatchingText(const QChar &lookAhead)
bool MatchingText::shouldInsertMatchingText(QChar lookAhead)
{
switch (lookAhead.unicode()) {
case '{': case '}':
@@ -101,7 +101,7 @@ bool MatchingText::shouldInsertMatchingText(const QChar &lookAhead)
}
QString MatchingText::insertMatchingBrace(const QTextCursor &cursor, const QString &textToProcess,
const QChar &la, int *skippedChars) const
QChar la, int *skippedChars) const
{
QTextCursor tc = cursor;
QTextDocument *doc = tc.document();

View File

@@ -42,10 +42,10 @@ public:
MatchingText();
static bool shouldInsertMatchingText(const QTextCursor &tc);
static bool shouldInsertMatchingText(const QChar &lookAhead);
static bool shouldInsertMatchingText(QChar lookAhead);
QString insertMatchingBrace(const QTextCursor &tc, const QString &text,
const QChar &la, int *skippedChars) const;
QChar la, int *skippedChars) const;
QString insertParagraphSeparator(const QTextCursor &tc) const;
private: