From 5fbe8785d2db2719fb8546d2f9e0ff0f99c02194 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 16 Apr 2020 00:03:08 -0400 Subject: [PATCH] surface_view: Add missing operator!= to ViewParams Provides logical symmetry to the interface. --- src/video_core/texture_cache/surface_view.cpp | 4 ++++ src/video_core/texture_cache/surface_view.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/video_core/texture_cache/surface_view.cpp b/src/video_core/texture_cache/surface_view.cpp index 57a1f5803..6b5f5984b 100644 --- a/src/video_core/texture_cache/surface_view.cpp +++ b/src/video_core/texture_cache/surface_view.cpp @@ -20,4 +20,8 @@ bool ViewParams::operator==(const ViewParams& rhs) const { std::tie(rhs.base_layer, rhs.num_layers, rhs.base_level, rhs.num_levels, rhs.target); } +bool ViewParams::operator!=(const ViewParams& rhs) const { + return !operator==(rhs); +} + } // namespace VideoCommon diff --git a/src/video_core/texture_cache/surface_view.h b/src/video_core/texture_cache/surface_view.h index b17fd11a9..90a8bb0ae 100644 --- a/src/video_core/texture_cache/surface_view.h +++ b/src/video_core/texture_cache/surface_view.h @@ -21,6 +21,7 @@ struct ViewParams { std::size_t Hash() const; bool operator==(const ViewParams& rhs) const; + bool operator!=(const ViewParams& rhs) const; bool IsLayered() const { switch (target) {