diff options
| author | levlam <levlam@telegram.org> | 2025-03-03 00:34:20 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2025-03-03 00:34:20 +0300 |
| commit | 9451b7aca813291874a6e93f82f49abfbb2b4a9b (patch) | |
| tree | c1a8dfff1d30480fcf2fbb749eee044612006571 /td/telegram/StoryForwardInfo.cpp | |
| parent | c8a5fc4e46b1216173922448dd69b08d6993b50e (diff) | |
Simplify DialogActionBar, FactCheck and StoryForwardInfo comparison.
Diffstat (limited to 'td/telegram/StoryForwardInfo.cpp')
| -rw-r--r-- | td/telegram/StoryForwardInfo.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/td/telegram/StoryForwardInfo.cpp b/td/telegram/StoryForwardInfo.cpp index 7c3a3dbcb..1d32a1212 100644 --- a/td/telegram/StoryForwardInfo.cpp +++ b/td/telegram/StoryForwardInfo.cpp @@ -57,15 +57,9 @@ td_api::object_ptr<td_api::storyRepostInfo> StoryForwardInfo::get_story_repost_i return td_api::make_object<td_api::storyRepostInfo>(std::move(origin), is_modified_); } -bool operator==(const unique_ptr<StoryForwardInfo> &lhs, const unique_ptr<StoryForwardInfo> &rhs) { - if (lhs == nullptr) { - return rhs == nullptr; - } - if (rhs == nullptr) { - return false; - } - return lhs->dialog_id_ == rhs->dialog_id_ && lhs->story_id_ == rhs->story_id_ && - lhs->sender_name_ == rhs->sender_name_ && lhs->is_modified_ == rhs->is_modified_; +bool operator==(const StoryForwardInfo &lhs, const StoryForwardInfo &rhs) { + return lhs.dialog_id_ == rhs.dialog_id_ && lhs.story_id_ == rhs.story_id_ && lhs.sender_name_ == rhs.sender_name_ && + lhs.is_modified_ == rhs.is_modified_; } } // namespace td |
