Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Jan 30, 2020
1 parent 51f6a97 commit 0216e99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/plugins/editing/CellMLTextView/src/cellmltextviewlexer.cpp
Expand Up @@ -555,10 +555,9 @@ void CellmlTextViewLexer::styleTextCurrent(int pBytesStart, int pBytesEnd,

// Check whether the given text contains some numbers

styleTextNumberRegEx(pBytesStart, pText,
pParameterBlock?
Style::ParameterNumber:
Style::Number);
styleTextNumber(pBytesStart, pText, pParameterBlock?
Style::ParameterNumber:
Style::Number);

// Let QScintilla know that we are done with the styling of the
// given text
Expand Down Expand Up @@ -799,9 +798,8 @@ void CellmlTextViewLexer::styleTextRegEx(int pBytesStart,

//==============================================================================

void CellmlTextViewLexer::styleTextNumberRegEx(int pBytesStart,
const QString &pText,
Style pStyle)
void CellmlTextViewLexer::styleTextNumber(int pBytesStart, const QString &pText,
Style pStyle)
{
// Style the given text using the number regular expression

Expand Down
3 changes: 1 addition & 2 deletions src/plugins/editing/CellMLTextView/src/cellmltextviewlexer.h
Expand Up @@ -92,8 +92,7 @@ class CellmlTextViewLexer : public QsciLexerCustom
const QString &pText, bool pParameterBlock);
void styleTextRegEx(int pBytesStart, const QString &pText,
const QRegularExpression &pRegEx, Style pStyle);
void styleTextNumberRegEx(int pBytesStart, const QString &pText,
Style pStyle);
void styleTextNumber(int pBytesStart, const QString &pText, Style pStyle);

bool validString(int pFrom, int pTo, Style pStyle) const;
int findString(const QString &pString, int pFrom, Style pStyle,
Expand Down

0 comments on commit 0216e99

Please sign in to comment.