forked from qt-creator/qt-creator
C++: Support negative enum values
Change-Id: I93dac08a62be467918dbc9f72239d34191a81fd6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
4dd4b180f3
commit
ebf26ca125
5
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
5
src/libs/3rdparty/cplusplus/Bind.cpp
vendored
@@ -468,7 +468,10 @@ bool isInteger(const StringLiteral *stringLiteral)
|
||||
{
|
||||
const int size = stringLiteral->size();
|
||||
const char *chars = stringLiteral->chars();
|
||||
for (int i = 0; i < size; ++i) {
|
||||
int i = 0;
|
||||
if (chars[i] == '-')
|
||||
++i;
|
||||
for (; i < size; ++i) {
|
||||
if (!isdigit(chars[i]))
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user