mirror of
https://gitee.com/openharmony/distributeddatamgr_datamgr_service
synced 2024-11-23 14:59:46 +00:00
fix object cppcheck
Signed-off-by: guoqi11 <guoqi53@huawei.com>
This commit is contained in:
parent
4e19b4fa6a
commit
938abdb280
@ -497,8 +497,8 @@ void ObjectStoreManager::ComputeStatus(const std::string& objectKey, const SaveI
|
||||
});
|
||||
}
|
||||
|
||||
void ObjectStoreManager::NotifyDataChanged(std::map<std::string, std::map<std::string, std::vector<uint8_t>>>& data,
|
||||
const SaveInfo& saveInfo)
|
||||
void ObjectStoreManager::NotifyDataChanged(const std::map<std::string, std::map<std::string,
|
||||
std::vector<uint8_t>>>& data, const SaveInfo& saveInfo)
|
||||
{
|
||||
for (auto const& [objectKey, results] : data) {
|
||||
restoreStatus_.ComputeIfAbsent(
|
||||
@ -1217,7 +1217,7 @@ int32_t ObjectStoreManager::OnAssetChanged(const uint32_t tokenId, const std::st
|
||||
auto snapshotKey = appId + SEPERATOR + sessionId;
|
||||
int32_t res = OBJECT_SUCCESS;
|
||||
bool exist = snapshots_.ComputeIfPresent(snapshotKey,
|
||||
[&res, &dataAsset, &deviceId](std::string key, std::shared_ptr<Snapshot> snapshot) {
|
||||
[&res, &dataAsset, &deviceId](const std::string key, std::shared_ptr<Snapshot> snapshot) {
|
||||
if (snapshot != nullptr) {
|
||||
res = snapshot->OnDataChanged(dataAsset, deviceId); // needChange
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ private:
|
||||
bool RegisterAssetsLister();
|
||||
void ComputeStatus(const std::string& objectKey, const SaveInfo& saveInfo,
|
||||
const std::map<std::string, std::map<std::string, std::vector<uint8_t>>>& data);
|
||||
void NotifyDataChanged(std::map<std::string, std::map<std::string, std::vector<uint8_t>>>& data,
|
||||
void NotifyDataChanged(const std::map<std::string, std::map<std::string, std::vector<uint8_t>>>& data,
|
||||
const SaveInfo& saveInfo);
|
||||
int32_t PushAssets(int32_t userId, const std::string &appId, const std::string &sessionId,
|
||||
const std::map<std::string, std::vector<uint8_t>> &data, const std::string &deviceId);
|
||||
|
Loading…
Reference in New Issue
Block a user