C++: change return type to enum.

And not have it converted to int after converting to unsigned.

Change-Id: If95caec46936c2a140c3fbd668fa2f085a9287ed
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Erik Verbruggen
2014-08-19 13:58:36 +02:00
committed by Nikolai Kosjar
parent cb35594800
commit 271c1bb89a
3 changed files with 20 additions and 20 deletions

View File

@@ -296,7 +296,7 @@ public:
const char *spell() const;
void reset();
inline unsigned kind() const { return f.kind; }
inline Kind kind() const { return static_cast<Kind>(f.kind); }
inline bool newline() const { return f.newline; }
inline bool whitespace() const { return f.whitespace; }
inline bool joined() const { return f.joined; }

View File

@@ -68,7 +68,7 @@ public:
const Token &tokenAt(unsigned index) const
{ return _tokens && index < tokenCount() ? (*_tokens)[index] : nullToken; }
int tokenKind(unsigned index) const { return tokenAt(index).kind(); }
Kind tokenKind(unsigned index) const { return tokenAt(index).kind(); }
const char *spell(unsigned index) const;
unsigned commentCount() const;