From 3e8277d65c6a23207bee66af5ee1b3565a0849b4 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 25 Jan 2019 18:44:23 +0300 Subject: [PATCH] Fix some possible use after move. GitOrigin-RevId: 37e17c445c9a9df56d85452c964603c08334045d --- td/telegram/FileReferenceManager.cpp | 3 ++- tdactor/td/actor/impl/Scheduler.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/td/telegram/FileReferenceManager.cpp b/td/telegram/FileReferenceManager.cpp index 8e540fa8..e52a68af 100644 --- a/td/telegram/FileReferenceManager.cpp +++ b/td/telegram/FileReferenceManager.cpp @@ -74,7 +74,8 @@ FileSourceId FileReferenceManager::create_wallpapers_file_source() { FileSourceId FileReferenceManager::create_web_page_file_source(string url) { FileSourceWebPage source{std::move(url)}; - return add_file_source_id(std::move(source), PSLICE() << "web page of " << source.url); + auto source_str = PSTRING() << "web page of " << source.url; + return add_file_source_id(std::move(source), source_str); } FileSourceId FileReferenceManager::create_saved_animations_file_source() { diff --git a/tdactor/td/actor/impl/Scheduler.h b/tdactor/td/actor/impl/Scheduler.h index 01e682e4..3945444d 100644 --- a/tdactor/td/actor/impl/Scheduler.h +++ b/tdactor/td/actor/impl/Scheduler.h @@ -111,7 +111,8 @@ ActorOwn Scheduler::register_actor_impl(Slice name, ActorT *actor_ptr, A actor_count_++; auto weak_info = info.get_weak(); auto actor_info = info.get(); - info->init(sched_id_, name, std::move(info), static_cast(actor_ptr), deleter, ActorTraits::is_lite); + actor_info->init(sched_id_, name, std::move(info), static_cast(actor_ptr), deleter, + ActorTraits::is_lite); ActorId actor_id = weak_info->actor_id(actor_ptr); if (sched_id != sched_id_) {