Fix bugprone-use-after-move warnings

Bug: 150783499
Test: WITH_TIDY=1 make
Change-Id: I185cb21521676ddbc4f2b7f098611a2efc7275e6
(cherry picked from commit c658184d36)
Merged-In: I185cb21521676ddbc4f2b7f098611a2efc7275e6
This commit is contained in:
Chih-Hung Hsieh
2020-03-06 14:00:53 -08:00
parent 3bc5168281
commit 243bc1929b

View File

@@ -70,8 +70,11 @@ std::unique_ptr<const ApkAssets> ApkAssets::LoadOverlay(const std::string& idmap
LOG(ERROR) << "failed to load IDMAP " << idmap_path;
return {};
}
return LoadImpl({} /*fd*/, loaded_idmap->OverlayApkPath(), std::move(idmap_asset),
std::move(loaded_idmap), system, false /*load_as_shared_library*/);
auto apkPath = loaded_idmap->OverlayApkPath();
return LoadImpl({} /*fd*/, apkPath,
std::move(idmap_asset),
std::move(loaded_idmap),
system, false /*load_as_shared_library*/);
}
std::unique_ptr<const ApkAssets> ApkAssets::LoadFromFd(unique_fd fd,