summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclaration.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-06 11:29:41 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-06 11:35:00 +0200
commit463f83630f8a5797cec1bd7dac354a3557572efb (patch)
tree90ca5406ef5453193593bcaaf522ee3bb744b8e4 /src/shared/cplusplus/CheckDeclaration.cpp
parent517d4f630db653b14903ff68becd5769fcb86090 (diff)
downloadqt-creator-463f83630f8a5797cec1bd7dac354a3557572efb.tar.gz
Speed up the comutation of the local members.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclaration.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclaration.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp
index 98e8616f70..5eb98735d1 100644
--- a/src/shared/cplusplus/CheckDeclaration.cpp
+++ b/src/shared/cplusplus/CheckDeclaration.cpp
@@ -187,12 +187,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
_scope, &name);
unsigned location = semantic()->location(it->value);
- if (! location) {
- if (it->value)
- location = it->value->firstToken();
- else
- location = ast->firstToken();
- }
+ if (! location)
+ location = ast->firstToken();
Function *fun = 0;
if (declTy && 0 != (fun = declTy->asFunctionType())) {