forked from qt-creator/qt-creator
Standardize on int for line and column values
Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
14
src/libs/3rdparty/cplusplus/Token.h
vendored
14
src/libs/3rdparty/cplusplus/Token.h
vendored
@@ -313,13 +313,13 @@ public:
|
||||
inline bool generated() const { return f.generated; }
|
||||
inline bool userDefinedLiteral() const { return f.userDefinedLiteral; }
|
||||
|
||||
inline unsigned bytes() const { return f.bytes; }
|
||||
inline unsigned bytesBegin() const { return byteOffset; }
|
||||
inline unsigned bytesEnd() const { return byteOffset + f.bytes; }
|
||||
inline int bytes() const { return f.bytes; }
|
||||
inline int bytesBegin() const { return byteOffset; }
|
||||
inline int bytesEnd() const { return byteOffset + f.bytes; }
|
||||
|
||||
inline unsigned utf16chars() const { return f.utf16chars; }
|
||||
inline unsigned utf16charsBegin() const { return utf16charOffset; }
|
||||
inline unsigned utf16charsEnd() const { return utf16charOffset + f.utf16chars; }
|
||||
inline int utf16chars() const { return f.utf16chars; }
|
||||
inline int utf16charsBegin() const { return utf16charOffset; }
|
||||
inline int utf16charsEnd() const { return utf16charOffset + f.utf16chars; }
|
||||
|
||||
inline bool isLiteral() const
|
||||
{ return f.kind >= T_FIRST_LITERAL && f.kind <= T_LAST_LITERAL; }
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
const StringLiteral *string;
|
||||
const Identifier *identifier;
|
||||
unsigned close_brace;
|
||||
unsigned lineno;
|
||||
int lineno;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user