hidl_version: add operator!=
This was missing and was needed for a CL internally.
Test: libhidl_test
Change-Id: Ib2cadbfc69b42b6c1ead8a8658adfa40d3ce2a3b
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 8c93998..7a5183b 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -845,6 +845,10 @@
return (mMajor == other.get_major() && mMinor == other.get_minor());
}
+ bool operator!=(const hidl_version& other) const {
+ return !(*this == other);
+ }
+
bool operator<(const hidl_version& other) const {
return (mMajor < other.get_major() ||
(mMajor == other.get_major() && mMinor < other.get_minor()));