diff --git a/src/shared/cplusplus/Symbol.cpp b/src/shared/cplusplus/Symbol.cpp index c02a10f318b..68b19c54e97 100644 --- a/src/shared/cplusplus/Symbol.cpp +++ b/src/shared/cplusplus/Symbol.cpp @@ -247,13 +247,13 @@ StringLiteral *Symbol::fileId() const return fileId; } -void Symbol::getPosition(unsigned *line, unsigned *column, StringLiteral **fileId) +void Symbol::getPosition(unsigned *line, unsigned *column, StringLiteral **fileId) const { translationUnit()->getPosition(_sourceOffset, line, column, fileId); } -void Symbol::getStartPosition(unsigned *line, unsigned *column, StringLiteral **fileId) +void Symbol::getStartPosition(unsigned *line, unsigned *column, StringLiteral **fileId) const { translationUnit()->getPosition(_startOffset, line, column, fileId); } -void Symbol::getEndPosition(unsigned *line, unsigned *column, StringLiteral **fileId) +void Symbol::getEndPosition(unsigned *line, unsigned *column, StringLiteral **fileId) const { translationUnit()->getPosition(_endOffset, line, column, fileId); } const char *Symbol::fileName() const diff --git a/src/shared/cplusplus/Symbol.h b/src/shared/cplusplus/Symbol.h index ac8f0b11cab..4db5d297c29 100644 --- a/src/shared/cplusplus/Symbol.h +++ b/src/shared/cplusplus/Symbol.h @@ -115,9 +115,9 @@ public: unsigned endOffset() const; void setEndOffset(unsigned offset); - void getPosition(unsigned *line, unsigned *column = 0, StringLiteral **fileId = 0); - void getStartPosition(unsigned *line, unsigned *column = 0, StringLiteral **fileId = 0); - void getEndPosition(unsigned *line, unsigned *column = 0, StringLiteral **fileId = 0); + void getPosition(unsigned *line, unsigned *column = 0, StringLiteral **fileId = 0) const; + void getStartPosition(unsigned *line, unsigned *column = 0, StringLiteral **fileId = 0) const; + void getEndPosition(unsigned *line, unsigned *column = 0, StringLiteral **fileId = 0) const; /// Returns this Symbol's name. Name *name() const;