liblp: convert more functions to use string_view (#4)
Test: builds Change-Id: Iad041762beb9eeab8b2174ab48a50677754248b5
This commit is contained in:
parent
a550e7f412
commit
c2ff970b17
|
@ -504,7 +504,7 @@ uint64_t MetadataBuilder::TotalSizeOfGroup(PartitionGroup* group) const {
|
|||
return total;
|
||||
}
|
||||
|
||||
void MetadataBuilder::RemovePartition(const std::string& name) {
|
||||
void MetadataBuilder::RemovePartition(std::string_view name) {
|
||||
for (auto iter = partitions_.begin(); iter != partitions_.end(); iter++) {
|
||||
if ((*iter)->name() == name) {
|
||||
partitions_.erase(iter);
|
||||
|
|
|
@ -260,7 +260,7 @@ class MetadataBuilder {
|
|||
Partition* AddPartition(const std::string& name, uint32_t attributes);
|
||||
|
||||
// Delete a partition by name if it exists.
|
||||
void RemovePartition(const std::string& name);
|
||||
void RemovePartition(std::string_view name);
|
||||
|
||||
// Find a partition by name. If no partition is found, nullptr is returned.
|
||||
Partition* FindPartition(std::string_view name);
|
||||
|
|
Loading…
Reference in New Issue