From 448c8622e71425ebd917406915876895a7e9d83d Mon Sep 17 00:00:00 2001 From: nerix Date: Wed, 28 Dec 2022 20:24:14 +0100 Subject: [PATCH] Remove unused operators in `Image` (#4267) --- CHANGELOG.md | 1 + src/messages/Image.cpp | 17 ----------------- src/messages/Image.hpp | 4 ++-- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6304f928..b27bd87f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Dev: Migrated to C++ 20 (#4252, #4257) - Dev: Enable LTO for main branch builds. (#4258, #4260) - Dev: Removed unused include directives. (#4266) +- Dev: Removed unused operators in `Image` (#4267) ## 2.4.0 diff --git a/src/messages/Image.cpp b/src/messages/Image.cpp index ffc0ffa51..f7ef40ad9 100644 --- a/src/messages/Image.cpp +++ b/src/messages/Image.cpp @@ -544,23 +544,6 @@ void Image::expireFrames() this->shouldLoad_ = true; // Mark as needing load again } -bool Image::operator==(const Image &other) const -{ - if (this->isEmpty() && other.isEmpty()) - return true; - if (!this->url_.string.isEmpty() && this->url_ == other.url_) - return true; - if (this->frames_->first() == other.frames_->first()) - return true; - - return false; -} - -bool Image::operator!=(const Image &other) const -{ - return !this->operator==(other); -} - ImageExpirationPool::ImageExpirationPool() { QObject::connect(&this->freeTimer_, &QTimer::timeout, [this] { diff --git a/src/messages/Image.hpp b/src/messages/Image.hpp index 7498116e8..eae285c8a 100644 --- a/src/messages/Image.hpp +++ b/src/messages/Image.hpp @@ -76,8 +76,8 @@ public: int height() const; bool animated() const; - bool operator==(const Image &image) const; - bool operator!=(const Image &image) const; + bool operator==(const Image &image) = delete; + bool operator!=(const Image &image) = delete; private: Image();