auto result_list = return_parcel->GetPkgInfo();
// TODO: check noentry error has returned if size of result_list is 0
- for (auto& pkginfo : result_list) {
- g_hash_table_insert(packages, (gpointer)pkginfo->package, (gpointer)pkginfo);
- // TODO: remove element from list. is this work?
- pkginfo = nullptr;
- }
+ for (auto& pkginfo : result_list)
+ g_hash_table_insert(packages, (gpointer)pkginfo->package,
+ (gpointer)pkginfo);
return PMINFO_R_OK;
}
tizen_base::Parcel parcel;
parcel.ReadParcelable(return_parcel.get());
auto result_list = return_parcel->GetAppInfo();
- for (auto& appinfo : result_list) {
- g_hash_table_insert(packages, (gpointer)appinfo->appid, (gpointer)appinfo);
- // TODO: remove element from list. is this work?
- appinfo = nullptr;
- }
+ for (auto& appinfo : result_list)
+ g_hash_table_insert(packages, (gpointer)appinfo->appid,
+ (gpointer)appinfo);
return PMINFO_R_OK;
}