add explicit operator!= for parray/ptext
This commit is contained in:
+15
@@ -198,6 +198,9 @@ struct parray {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
bool operator!=(const parray& s) const {
|
||||||
|
return !this->operator==(s);
|
||||||
|
}
|
||||||
|
|
||||||
void clear(ItemT v = 0) {
|
void clear(ItemT v = 0) {
|
||||||
for (size_t x = 0; x < Count; x++) {
|
for (size_t x = 0; x < Count; x++) {
|
||||||
@@ -285,6 +288,18 @@ struct ptext : parray<CharT, Count> {
|
|||||||
bool operator==(const ptext<OtherCharT, OtherCount>& s) const {
|
bool operator==(const ptext<OtherCharT, OtherCount>& s) const {
|
||||||
return text_streq_t(this->items, s.items);
|
return text_streq_t(this->items, s.items);
|
||||||
}
|
}
|
||||||
|
template <typename OtherCharT>
|
||||||
|
bool operator!=(const OtherCharT* s) const {
|
||||||
|
return !this->operator==(s);
|
||||||
|
}
|
||||||
|
template <typename OtherCharT>
|
||||||
|
bool operator!=(const std::basic_string<OtherCharT>& s) const {
|
||||||
|
return !this->operator==(s);
|
||||||
|
}
|
||||||
|
template <typename OtherCharT, size_t OtherCount>
|
||||||
|
bool operator!=(const ptext<OtherCharT, OtherCount>& s) const {
|
||||||
|
return !this->operator==(s);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename OtherCharT>
|
template <typename OtherCharT>
|
||||||
bool eq_n(const OtherCharT* s, size_t count) const {
|
bool eq_n(const OtherCharT* s, size_t count) const {
|
||||||
|
|||||||
Reference in New Issue
Block a user