aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/StoryContent.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-12-12 23:20:41 +0300
committerlevlam <levlam@telegram.org>2023-12-12 23:20:41 +0300
commit542271a1fdbb6aa34c868d48fb4cc5ba9e002635 (patch)
treee315d93e6b24b41f1e02ca350bd9a2d1295d8e63 /td/telegram/StoryContent.cpp
parentdce778442ceb4db1f98dddfd315d06dfe63bf6ea (diff)
Don't save get_id() to a used-once variable before switch.
Diffstat (limited to 'td/telegram/StoryContent.cpp')
-rw-r--r--td/telegram/StoryContent.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/td/telegram/StoryContent.cpp b/td/telegram/StoryContent.cpp
index f95db21f3..f3e3a2a9f 100644
--- a/td/telegram/StoryContent.cpp
+++ b/td/telegram/StoryContent.cpp
@@ -189,8 +189,7 @@ void add_story_content_dependencies(Dependencies &dependencies, const StoryConte
unique_ptr<StoryContent> get_story_content(Td *td, tl_object_ptr<telegram_api::MessageMedia> &&media_ptr,
DialogId owner_dialog_id) {
CHECK(media_ptr != nullptr);
- int32 constructor_id = media_ptr->get_id();
- switch (constructor_id) {
+ switch (media_ptr->get_id()) {
case telegram_api::messageMediaPhoto::ID: {
auto media = move_tl_object_as<telegram_api::messageMediaPhoto>(media_ptr);
if (media->photo_ == nullptr || (media->flags_ & telegram_api::messageMediaPhoto::TTL_SECONDS_MASK) != 0 ||