!127 fix distributed mission manager bug when missionInfos is empty

Merge pull request !127 from zhangmingxiang/0130
This commit is contained in:
openharmony_ci 2022-01-30 06:57:07 +00:00 committed by Gitee
commit 2dcedefdaa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -30,7 +30,7 @@ int32_t MissionInfoConverter::ConvertToDstbMissionInfos(std::vector<AAFwk::Missi
std::vector<DstbMissionInfo>& dstbMissionInfos)
{
if (missionInfos.empty()) {
return INVALID_PARAMETERS_ERR;
return ERR_OK;
}
for (auto iter = missionInfos.begin(); iter != missionInfos.end(); iter++) {
DstbMissionInfo dstbMissionInfo;
@ -50,7 +50,7 @@ int32_t MissionInfoConverter::ConvertToMissionInfos(std::vector<DstbMissionInfo>
std::vector<AAFwk::MissionInfo>& missionInfos)
{
if (dstbMissionInfos.empty()) {
return INVALID_PARAMETERS_ERR;
return ERR_OK;
}
for (auto iter = dstbMissionInfos.begin(); iter != dstbMissionInfos.end(); iter++) {
AAFwk::MissionInfo missionInfo;