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:
10
src/libs/3rdparty/cplusplus/Literals.h
vendored
10
src/libs/3rdparty/cplusplus/Literals.h
vendored
@@ -36,15 +36,15 @@ public:
|
||||
typedef iterator const_iterator;
|
||||
|
||||
public:
|
||||
Literal(const char *chars, unsigned size);
|
||||
Literal(const char *chars, int size);
|
||||
virtual ~Literal();
|
||||
|
||||
iterator begin() const { return _chars; }
|
||||
iterator end() const { return _chars + _size; }
|
||||
|
||||
char at(unsigned index) const { return _chars[index]; }
|
||||
char at(int index) const { return _chars[index]; }
|
||||
const char *chars() const { return _chars; }
|
||||
unsigned size() const { return _size; }
|
||||
int size() const { return _size; }
|
||||
|
||||
unsigned hashCode() const { return _hashCode; }
|
||||
static unsigned hashCode(const char *chars, unsigned size);
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
class CPLUSPLUS_EXPORT NumericLiteral: public Literal
|
||||
{
|
||||
public:
|
||||
NumericLiteral(const char *chars, unsigned size);
|
||||
NumericLiteral(const char *chars, int size);
|
||||
|
||||
enum {
|
||||
NumericLiteralIsInt,
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
class CPLUSPLUS_EXPORT Identifier: public Literal, public Name
|
||||
{
|
||||
public:
|
||||
Identifier(const char *chars, unsigned size)
|
||||
Identifier(const char *chars, int size)
|
||||
: Literal(chars, size)
|
||||
{ }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user