tokenize: Improved const correctness. There are no functional changes.
This commit is contained in:
parent
b3c60bf6b2
commit
2f8a24764f
|
@ -2955,7 +2955,7 @@ void Tokenizer::setVarIdPass2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void linkBrackets(Tokenizer* tokenizer, std::stack<const Token*>& type, std::stack<Token*>& links, Token* token, char open, char close)
|
static void linkBrackets(const Tokenizer * const tokenizer, std::stack<const Token*>& type, std::stack<Token*>& links, Token * const token, const char open, const char close)
|
||||||
{
|
{
|
||||||
if (token->str()[0] == open) {
|
if (token->str()[0] == open) {
|
||||||
links.push(token);
|
links.push(token);
|
||||||
|
@ -5291,12 +5291,12 @@ bool Tokenizer::simplifyFunctionReturn()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tokenizer::simplifyVarDecl(bool only_k_r_fpar)
|
void Tokenizer::simplifyVarDecl(const bool only_k_r_fpar)
|
||||||
{
|
{
|
||||||
simplifyVarDecl(list.front(), nullptr, only_k_r_fpar);
|
simplifyVarDecl(list.front(), nullptr, only_k_r_fpar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tokenizer::simplifyVarDecl(Token * tokBegin, Token * tokEnd, bool only_k_r_fpar)
|
void Tokenizer::simplifyVarDecl(Token * tokBegin, const Token * const tokEnd, const bool only_k_r_fpar)
|
||||||
{
|
{
|
||||||
// Split up variable declarations..
|
// Split up variable declarations..
|
||||||
// "int a=4;" => "int a; a=4;"
|
// "int a=4;" => "int a; a=4;"
|
||||||
|
|
|
@ -238,8 +238,8 @@ public:
|
||||||
* Simplify variable declarations (split up)
|
* Simplify variable declarations (split up)
|
||||||
* \param only_k_r_fpar Only simplify K&R function parameters
|
* \param only_k_r_fpar Only simplify K&R function parameters
|
||||||
*/
|
*/
|
||||||
void simplifyVarDecl(bool only_k_r_fpar);
|
void simplifyVarDecl(const bool only_k_r_fpar);
|
||||||
void simplifyVarDecl(Token * tokBegin, Token * tokEnd, bool only_k_r_fpar);
|
void simplifyVarDecl(Token * tokBegin, const Token * const tokEnd, const bool only_k_r_fpar);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simplify variable initialization
|
* Simplify variable initialization
|
||||||
|
|
Loading…
Reference in New Issue