Skip to content

Commit cae79c4

Browse files
author
Your Name
committed
Add const
1 parent ce1b3cd commit cae79c4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/templatesimplifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ TemplateSimplifier::TemplateSimplifier(Tokenizer &tokenizer)
281281
mErrorLogger(mTokenizer->getErrorLogger())
282282
{}
283283

284-
void TemplateSimplifier::checkComplicatedSyntaxErrorsInTemplates()
284+
void TemplateSimplifier::checkComplicatedSyntaxErrorsInTemplates() const
285285
{
286286
// check for more complicated syntax errors when using templates..
287287
for (const Token *tok = mTokenList->front(); tok; tok = tok->next()) {
@@ -2724,7 +2724,7 @@ static bool validTokenEnd(bool bounded, const Token *tok, const Token *backToken
27242724

27252725
// TODO: This is not the correct class for simplifyCalculations(), so it
27262726
// should be moved away.
2727-
bool TemplateSimplifier::simplifyCalculations(Token* frontToken, const Token *backToken, bool isTemplate)
2727+
bool TemplateSimplifier::simplifyCalculations(Token* frontToken, const Token *backToken, bool isTemplate) const
27282728
{
27292729
bool ret = false;
27302730
const bool bounded = frontToken || backToken;

lib/templatesimplifier.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class CPPCHECKLIB TemplateSimplifier {
5959

6060
/**
6161
*/
62-
void checkComplicatedSyntaxErrorsInTemplates();
62+
void checkComplicatedSyntaxErrorsInTemplates() const;
6363

6464
/**
6565
* is the token pointing at a template parameters block
@@ -334,7 +334,7 @@ class CPPCHECKLIB TemplateSimplifier {
334334
* @return true if modifications to token-list are done.
335335
* false if no modifications are done.
336336
*/
337-
bool simplifyCalculations(Token* frontToken = nullptr, const Token *backToken = nullptr, bool isTemplate = true);
337+
bool simplifyCalculations(Token* frontToken = nullptr, const Token *backToken = nullptr, bool isTemplate = true) const;
338338

339339
/** Simplify template instantiation arguments.
340340
* @param start first token of arguments

0 commit comments

Comments
 (0)