修改map,vector初始化

Signed-off-by: 邹友松 <zouyousong1@h-partners.com>
This commit is contained in:
邹友松
2023-09-05 10:13:28 +08:00
parent 759cedfcd3
commit 694c535b58
15 changed files with 15 additions and 15 deletions
@@ -47,7 +47,7 @@ private:
napi_env env_ {};
napi_ref thisReference_ {};
std::map<uint32_t, std::shared_ptr<IUpdateSession>> sessions_ {};
std::map<uint32_t, std::shared_ptr<IUpdateSession>> sessions_;
#ifndef UPDATER_API_TEST
std::recursive_mutex sessionMutex_;
#endif
@@ -50,7 +50,7 @@ private:
AlarmType alarmType_;
std::string logTag_;
int32_t timeLooperInterval_ = AlarmLooper::DEFAULT_LOOPER_INTERVAL;
std::map<BusinessAlarmType, AlarmCallback> callbackMap_ {};
std::map<BusinessAlarmType, AlarmCallback> callbackMap_;
};
} // namespace UpdateEngine
} // namespace OHOS
@@ -41,7 +41,7 @@ private:
void BuildTimer();
private:
std::map<AlarmType, uint32_t> lastRegisterTimeIdMap_ {};
std::map<AlarmType, uint32_t> lastRegisterTimeIdMap_;
std::shared_ptr<OHOS::Utils::Timer> timer_ = nullptr;
std::mutex mutex_;
};
@@ -37,7 +37,7 @@ public:
std::string reserveUrl;
std::string path;
std::string veriftInfo;
std::map<std::string, std::string> header {};
std::map<std::string, std::string> header;
std::string requestBody;
int32_t retryTimes = 0;
int64_t packageSize = 0;
+1 -1
View File
@@ -133,7 +133,7 @@ public:
private:
std::mutex clientProxyMapLock_;
std::map<UpgradeInfo, ClientProxy> clientProxyMap_ {};
std::map<UpgradeInfo, ClientProxy> clientProxyMap_;
static sptr<UpdateService> updateService_;
std::shared_ptr<UpdateServiceImplManager> updateImplMgr_ = nullptr;
};
@@ -36,7 +36,7 @@ public:
private:
std::mutex updateImplMapLock_;
std::map<UpgradeInfo, sptr<IServiceOnlineUpdater>> updateImpMap_ {};
std::map<UpgradeInfo, sptr<IServiceOnlineUpdater>> updateImpMap_;
};
} // namespace UpdateEngine
} // namespace OHOS
@@ -81,7 +81,7 @@ private:
bool IsPermissionGranted(uint32_t code);
private:
std::map<uint32_t, RequestFuncType> requestFuncMap_ {};
std::map<uint32_t, RequestFuncType> requestFuncMap_;
};
} // namespace UpdateEngine
} // namespace OHOS
@@ -167,7 +167,7 @@ private:
RequestType requestType_ = RequestType::CHECK;
Duration duration_ {};
CheckAndAuthInfo checkAndAuthInfo_ {};
std::vector<FirmwareComponent> checkResultList_ {};
std::vector<FirmwareComponent> checkResultList_;
};
} // namespace UpdateEngine
} // namespace OHOS
@@ -56,7 +56,7 @@ private:
void BuildVersionDigest(NewVersionInfo &newVersionInfo, const std::vector<FirmwareComponent> &componentList);
private:
std::vector<FirmwareComponent> componentList_ {};
std::vector<FirmwareComponent> componentList_;
Duration duration_ {};
bool isSameWithDb_ = true;
CheckStatus status_ = CheckStatus::CHECK_FAIL;
@@ -39,7 +39,7 @@ private:
FirmwareCheckComponentCallback checkComponentCallback_ {};
Duration duration_ {};
CheckAndAuthInfo checkAndAuthInfo_ {};
std::vector<FirmwareComponent> componentList_ {};
std::vector<FirmwareComponent> componentList_;
CheckStatus status_ = CheckStatus::CHECK_SUCCESS;
};
} // namespace UpdateEngine
@@ -40,7 +40,7 @@ private:
private:
DownloadOptions downloadOptions_ {};
std::vector<FirmwareComponent> components_ {};
std::vector<FirmwareComponent> components_;
FirmwareProgressCallback firmwareProgressCallback_ {};
FirmwareTask tasks_ {};
UpgradeStatus upgradeStatus_;
@@ -42,7 +42,7 @@ private:
InstallType installType_;
FirmwareInstallExecutorCallback installCallback_;
InstallCallbackInfo installCallbackInfo_;
std::vector<FirmwareComponent> components_ {};
std::vector<FirmwareComponent> components_;
FirmwareTask tasks_ {};
Progress taskProgress_ {};
std::shared_ptr<FirmwarePreferencesUtil> preferencesUtil_ =
@@ -39,7 +39,7 @@ private:
int32_t AnalyzeBlVersionCheckResults(nlohmann::json &root, BlCheckResponse &response);
private:
std::vector<FirmwareComponent> components_ {};
std::vector<FirmwareComponent> components_;
};
} // namespace UpdateEngine
} // namespace OHOS
@@ -53,7 +53,7 @@ public:
private:
std::recursive_mutex mutex_;
std::map<AccessType, std::shared_ptr<IAccess>> accessMap_ {};
std::map<AccessType, std::shared_ptr<IAccess>> accessMap_;
bool isRemoteIdle_ = true;
};
} // namespace UpdateEngine
+1 -1
View File
@@ -52,7 +52,7 @@ private:
sptr<NetObserver> observer_ = nullptr;
std::mutex netChangeMutex_;
NetType netType_ = NetType::NO_NET;
std::map<NetChangeCallbackType, NetChangeCallback> netChangeCallbackMap_ {};
std::map<NetChangeCallbackType, NetChangeCallback> netChangeCallbackMap_;
};
} // namespace UpdateEngine
} // namespace OHOS