Skip to content

Commit

Permalink
Merge "liblp: convert more functions to use string_view (aosp-mirror#4)…
Browse files Browse the repository at this point in the history
…" am: 365ef6f [formerly 116d2ff]

am: b1fd8d8 [formerly a775458]

Change-Id: I4d7e71b58f6b062430e557af679d0f1cf29ad516

Former-commit-id: e3e249a
  • Loading branch information
Yifan Hong authored and android-build-merger committed Sep 16, 2019
2 parents 5bf568e + b1fd8d8 commit a9b937f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs_mgr/liblp/builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs_mgr/liblp/include/liblp/builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a9b937f

Please sign in to comment.