Use find_if

This commit is contained in:
LoveSy
2024-08-08 22:32:09 +08:00
committed by John Wu
parent 3a0becc783
commit 9a9e617c35
3 changed files with 14 additions and 22 deletions

View File

@@ -229,14 +229,6 @@ kv_pairs load_partition_map() {
return {};
}
std::string get_partition_name_for_device(const kv_pairs &partition_map, const std::string &query_device){
for (const auto &[device, partition] : partition_map) {
if (query_device == device)
return partition;
}
return {};
}
bool check_two_stage() {
if (access("/apex", F_OK) == 0)
return true;