Fix some possible use after move.

GitOrigin-RevId: 37e17c445c9a9df56d85452c964603c08334045d
This commit is contained in:
levlam 2019-01-25 18:44:23 +03:00
parent 4a36aaaa9d
commit 3e8277d65c
2 changed files with 4 additions and 2 deletions

View File

@ -74,7 +74,8 @@ FileSourceId FileReferenceManager::create_wallpapers_file_source() {
FileSourceId FileReferenceManager::create_web_page_file_source(string url) { FileSourceId FileReferenceManager::create_web_page_file_source(string url) {
FileSourceWebPage source{std::move(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() { FileSourceId FileReferenceManager::create_saved_animations_file_source() {

View File

@ -111,7 +111,8 @@ ActorOwn<ActorT> Scheduler::register_actor_impl(Slice name, ActorT *actor_ptr, A
actor_count_++; actor_count_++;
auto weak_info = info.get_weak(); auto weak_info = info.get_weak();
auto actor_info = info.get(); auto actor_info = info.get();
info->init(sched_id_, name, std::move(info), static_cast<Actor *>(actor_ptr), deleter, ActorTraits<ActorT>::is_lite); actor_info->init(sched_id_, name, std::move(info), static_cast<Actor *>(actor_ptr), deleter,
ActorTraits<ActorT>::is_lite);
ActorId<ActorT> actor_id = weak_info->actor_id(actor_ptr); ActorId<ActorT> actor_id = weak_info->actor_id(actor_ptr);
if (sched_id != sched_id_) { if (sched_id != sched_id_) {