From a91551eff4a8b846bd7597a13d157f617c09b00e Mon Sep 17 00:00:00 2001 From: huaqingsimeng <1004904143@qq.com> Date: Thu, 13 Apr 2023 11:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E6=80=81=E6=89=AB=E6=8F=8F=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huaqingsimeng --- services/backup_sa/src/module_ipc/svc_session_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/backup_sa/src/module_ipc/svc_session_manager.cpp b/services/backup_sa/src/module_ipc/svc_session_manager.cpp index f40291e69..030e0ddff 100644 --- a/services/backup_sa/src/module_ipc/svc_session_manager.cpp +++ b/services/backup_sa/src/module_ipc/svc_session_manager.cpp @@ -411,7 +411,7 @@ bool SvcSessionManager::IsOnAllBundlesFinished() throw BError(BError::Codes::SA_INVAL_ARG, "No caller token was specified"); } auto iter = find_if(impl_.backupExtNameMap.begin(), impl_.backupExtNameMap.end(), - [](auto &it) { return it.second.isBundleFinished == false; }); + [](const auto &it) { return it.second.isBundleFinished == false; }); if (iter == impl_.backupExtNameMap.end() && impl_.isAppendFinish) { return true; } @@ -482,7 +482,7 @@ bool SvcSessionManager::GetNeedToInstall(const std::string &bundleName) bool SvcSessionManager::NeedToUnloadService() { unique_lock lock(lock_); - if (!impl_.clientToken || !impl_.clientToken || !impl_.clientProxy || !impl_.backupExtNameMap.size()) { + if (!impl_.clientToken || !impl_.clientProxy || !impl_.backupExtNameMap.size()) { return true; } return false; -- Gitee