Skip to content

Commit af26f00

Browse files
committed
gui: update copyright message in about dialog
1 parent 3704aa9 commit af26f00

3 files changed

Lines changed: 22 additions & 21 deletions

File tree

gui/about.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<item>
7979
<widget class="QLabel" name="mCopyright">
8080
<property name="text">
81-
<string>Copyright © 2007-2017 Cppcheck team.</string>
81+
<string>Copyright © 2007-2018 Cppcheck team.</string>
8282
</property>
8383
<property name="wordWrap">
8484
<bool>true</bool>

lib/tokenize.cpp

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,26 +1942,27 @@ void Tokenizer::simplifyRoundCurlyParentheses()
19421942
void Tokenizer::simplifySQL()
19431943
{
19441944
for (Token *tok = list.front(); tok; tok = tok->next()) {
1945-
if (Token::simpleMatch(tok, "__CPPCHECK_EMBEDDED_SQL_EXEC__ SQL")) {
1946-
const Token *end = findSQLBlockEnd(tok);
1947-
if (end == nullptr)
1948-
syntaxError(nullptr);
1945+
if (!Token::simpleMatch(tok, "__CPPCHECK_EMBEDDED_SQL_EXEC__ SQL"))
1946+
continue;
19491947

1950-
const std::string instruction = tok->stringifyList(end);
1951-
// delete all tokens until the embedded SQL block end
1952-
Token::eraseTokens(tok, end);
1948+
const Token *end = findSQLBlockEnd(tok);
1949+
if (end == nullptr)
1950+
syntaxError(nullptr);
19531951

1954-
// insert "asm ( "instruction" ) ;"
1955-
tok->str("asm");
1956-
// it can happen that 'end' is NULL when wrong code is inserted
1957-
if (!tok->next())
1958-
tok->insertToken(";");
1959-
tok->insertToken(")");
1960-
tok->insertToken("\"" + instruction + "\"");
1961-
tok->insertToken("(");
1962-
// jump to ';' and continue
1963-
tok = tok->tokAt(3);
1964-
}
1952+
const std::string instruction = tok->stringifyList(end);
1953+
// delete all tokens until the embedded SQL block end
1954+
Token::eraseTokens(tok, end);
1955+
1956+
// insert "asm ( "instruction" ) ;"
1957+
tok->str("asm");
1958+
// it can happen that 'end' is NULL when wrong code is inserted
1959+
if (!tok->next())
1960+
tok->insertToken(";");
1961+
tok->insertToken(")");
1962+
tok->insertToken("\"" + instruction + "\"");
1963+
tok->insertToken("(");
1964+
// jump to ';' and continue
1965+
tok = tok->tokAt(3);
19651966
}
19661967
}
19671968

@@ -10058,7 +10059,7 @@ void Tokenizer::SimplifyNamelessRValueReferences()
1005810059
}
1005910060
}
1006010061

10061-
const Token *Tokenizer::findSQLBlockEnd(const Token *tokSQLStart) const
10062+
const Token *Tokenizer::findSQLBlockEnd(const Token *tokSQLStart)
1006210063
{
1006310064
const Token *tokLastEnd = nullptr;
1006410065
for (const Token *tok = tokSQLStart->tokAt(2); tok != nullptr; tok = tok->next()) {

lib/tokenize.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ class CPPCHECKLIB Tokenizer {
719719
void printUnknownTypes() const;
720720

721721
/** Find end of SQL (or PL/SQL) block */
722-
const Token *findSQLBlockEnd(const Token *tokSQLStart) const;
722+
static const Token *findSQLBlockEnd(const Token *tokSQLStart);
723723

724724
public:
725725

0 commit comments

Comments
 (0)