summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/TranslationUnit.h
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/TranslationUnit.h
parentb792b934e48c741b804f19378b6028f32c1c04eb (diff)
downloadqt-creator-fade61a8a9397f44d31c5ab4ede57e5259de8880.tar.gz
Use const literals.
Diffstat (limited to 'src/shared/cplusplus/TranslationUnit.h')
-rw-r--r--src/shared/cplusplus/TranslationUnit.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/shared/cplusplus/TranslationUnit.h b/src/shared/cplusplus/TranslationUnit.h
index cc26f44be4..b10a4f3f3f 100644
--- a/src/shared/cplusplus/TranslationUnit.h
+++ b/src/shared/cplusplus/TranslationUnit.h
@@ -65,12 +65,12 @@ class CPLUSPLUS_EXPORT TranslationUnit
void operator =(const TranslationUnit &other);
public:
- TranslationUnit(Control *control, StringLiteral *fileId);
+ TranslationUnit(Control *control, const StringLiteral *fileId);
~TranslationUnit();
Control *control() const;
- StringLiteral *fileId() const;
+ const StringLiteral *fileId() const;
const char *fileName() const;
unsigned fileNameLength() const;
@@ -86,10 +86,10 @@ public:
const char *spell(unsigned index) const;
unsigned matchingBrace(unsigned index) const;
- Identifier *identifier(unsigned index) const;
- Literal *literal(unsigned index) const;
- StringLiteral *stringLiteral(unsigned index) const;
- NumericLiteral *numericLiteral(unsigned index) const;
+ const Identifier *identifier(unsigned index) const;
+ const Literal *literal(unsigned index) const;
+ const StringLiteral *stringLiteral(unsigned index) const;
+ const NumericLiteral *numericLiteral(unsigned index) const;
MemoryPool *memoryPool() const;
AST *ast() const;
@@ -129,26 +129,26 @@ public:
void getTokenStartPosition(unsigned index, unsigned *line,
unsigned *column = 0,
- StringLiteral **fileName = 0) const;
+ const StringLiteral **fileName = 0) const;
void getTokenEndPosition(unsigned index, unsigned *line,
unsigned *column = 0,
- StringLiteral **fileName = 0) const;
+ const StringLiteral **fileName = 0) const;
void getPosition(unsigned offset,
unsigned *line,
unsigned *column = 0,
- StringLiteral **fileName = 0) const;
+ const StringLiteral **fileName = 0) const;
void getTokenPosition(unsigned index,
unsigned *line,
unsigned *column = 0,
- StringLiteral **fileName = 0) const;
+ const StringLiteral **fileName = 0) const;
void pushLineOffset(unsigned offset);
void pushPreprocessorLine(unsigned offset,
unsigned line,
- StringLiteral *fileName);
+ const StringLiteral *fileName);
unsigned findPreviousLineOffset(unsigned tokenIndex) const;
@@ -156,11 +156,11 @@ public:
struct PPLine {
unsigned offset;
unsigned line;
- StringLiteral *fileName;
+ const StringLiteral *fileName;
PPLine(unsigned offset = 0,
unsigned line = 0,
- StringLiteral *fileName = 0)
+ const StringLiteral *fileName = 0)
: offset(offset), line(line), fileName(fileName)
{ }
@@ -181,7 +181,7 @@ private:
void showErrorLine(unsigned index, unsigned column, FILE *out);
Control *_control;
- StringLiteral *_fileId;
+ const StringLiteral *_fileId;
const char *_firstSourceChar;
const char *_lastSourceChar;
Array<Token, 8> *_tokens;