forked from qt-creator/qt-creator
C++: fix PPToken equals operator for c-strings.
Change-Id: I37411faa1724fb69467036279b2821e33cad26b5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -89,7 +89,7 @@ public:
|
||||
{ return !this->operator==(other); }
|
||||
|
||||
bool operator==(const char *other) const
|
||||
{ return qstrncmp(m_start, other, qstrlen(other)) == 0; }
|
||||
{ return m_length == (int) qstrlen(other) && !qstrncmp(m_start, other, m_length); }
|
||||
bool operator!=(const char *other) const
|
||||
{ return !this->operator==(other); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user