preprocessor: provide direct char* overloads for ByteArrayRef::operator==

Change-Id: I58de7e704bdbd3861a4a534d8080cc2a8399b7eb
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
hjk
2012-04-18 11:54:36 +02:00
committed by hjk
parent 9e3127a2f6
commit 4e83279123
2 changed files with 6 additions and 3 deletions

View File

@@ -58,6 +58,11 @@ public:
bool operator!=(const QByteArray &other) const
{ return !this->operator==(other); }
bool operator==(const char *other) const
{ return qstrncmp(m_ref->constData() + m_offset, other, strlen(other)) == 0; }
bool operator!=(const char *other) const
{ return !this->operator==(other); }
bool startsWith(const char *ch) const;
int count(char c) const;