Added JsonString::operator!=

This commit is contained in:
Benoit Blanchon committed 2020-07-31 14:02:20 +02:00
1 parent 298864bafe
commit 6841b80466
4 files changed
+73 -1

No files matched your search

+10
View File
@@ -38,6 +38,16 @@ class String {
return strcmp(lhs._data, rhs._data) == 0;
}
friend bool operator!=(String lhs, String rhs) {
if (lhs._data == rhs._data)
return false;
if (!lhs._data)
return true;
if (!rhs._data)
return true;
return strcmp(lhs._data, rhs._data) != 0;
}
private:
const char* _data;
bool _isStatic;