From 3370b5fad335d791e141f8d1a55e2caa3e4c6f29 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 1 Apr 2022 10:16:07 -0700 Subject: [PATCH] add explicit operator!= for parray/ptext --- src/Text.hh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Text.hh b/src/Text.hh index a97bba75..9764dff8 100644 --- a/src/Text.hh +++ b/src/Text.hh @@ -198,6 +198,9 @@ struct parray { } return true; } + bool operator!=(const parray& s) const { + return !this->operator==(s); + } void clear(ItemT v = 0) { for (size_t x = 0; x < Count; x++) { @@ -285,6 +288,18 @@ struct ptext : parray { bool operator==(const ptext& s) const { return text_streq_t(this->items, s.items); } + template + bool operator!=(const OtherCharT* s) const { + return !this->operator==(s); + } + template + bool operator!=(const std::basic_string& s) const { + return !this->operator==(s); + } + template + bool operator!=(const ptext& s) const { + return !this->operator==(s); + } template bool eq_n(const OtherCharT* s, size_t count) const {