summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckName.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-12-01 11:33:13 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2009-12-01 11:46:36 +0100
commitfade61a8a9397f44d31c5ab4ede57e5259de8880 (patch)
tree539129b8b2594cad57752f3883b4c766f1299ef6 /src/shared/cplusplus/CheckName.cpp
parentb792b934e48c741b804f19378b6028f32c1c04eb (diff)
downloadqt-creator-fade61a8a9397f44d31c5ab4ede57e5259de8880.tar.gz
Use const literals.
Diffstat (limited to 'src/shared/cplusplus/CheckName.cpp')
-rw-r--r--src/shared/cplusplus/CheckName.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/cplusplus/CheckName.cpp b/src/shared/cplusplus/CheckName.cpp
index 63a1885128..1ad29a27d3 100644
--- a/src/shared/cplusplus/CheckName.cpp
+++ b/src/shared/cplusplus/CheckName.cpp
@@ -343,7 +343,7 @@ bool CheckName::visit(ConversionFunctionIdAST *ast)
bool CheckName::visit(SimpleNameAST *ast)
{
- Identifier *id = identifier(ast->identifier_token);
+ const Identifier *id = identifier(ast->identifier_token);
_name = control()->nameId(id);
ast->name = _name;
return false;
@@ -351,7 +351,7 @@ bool CheckName::visit(SimpleNameAST *ast)
bool CheckName::visit(DestructorNameAST *ast)
{
- Identifier *id = identifier(ast->identifier_token);
+ const Identifier *id = identifier(ast->identifier_token);
_name = control()->destructorNameId(id);
ast->name = _name;
return false;
@@ -359,7 +359,7 @@ bool CheckName::visit(DestructorNameAST *ast)
bool CheckName::visit(TemplateIdAST *ast)
{
- Identifier *id = identifier(ast->identifier_token);
+ const Identifier *id = identifier(ast->identifier_token);
std::vector<FullySpecifiedType> templateArguments;
for (TemplateArgumentListAST *it = ast->template_argument_list; it;
it = it->next) {
@@ -380,7 +380,7 @@ bool CheckName::visit(ObjCSelectorWithoutArgumentsAST *ast)
{
if (ast->name_token) {
std::vector<Name *> names;
- Identifier *id = control()->findOrInsertIdentifier(spell(ast->name_token));
+ const Identifier *id = control()->findOrInsertIdentifier(spell(ast->name_token));
NameId *nameId = control()->nameId(id);
names.push_back(nameId);
_name = control()->selectorNameId(&names[0], names.size(), false);
@@ -395,7 +395,7 @@ bool CheckName::visit(ObjCSelectorWithArgumentsAST *ast)
std::vector<Name *> names;
for (ObjCSelectorArgumentListAST *it = ast->selector_argument_list; it; it = it->next) {
if (it->value->name_token) {
- Identifier *id = control()->findOrInsertIdentifier(spell(it->value->name_token));
+ const Identifier *id = control()->findOrInsertIdentifier(spell(it->value->name_token));
NameId *nameId = control()->nameId(id);
names.push_back(nameId);
} else {
@@ -420,7 +420,7 @@ bool CheckName::visit(ObjCMessageArgumentDeclarationAST *ast)
type = semantic()->check(ast->type_name, _scope);
if (ast->param_name_token) {
- Identifier *id = identifier(ast->param_name_token);
+ const Identifier *id = identifier(ast->param_name_token);
_name = control()->nameId(id);
ast->name = _name;