liblp: convert more functions to use string_view (#3)
Test: builds Change-Id: Ia448993ff61d46ae2280e3d3c02b5e84dd51f37c
This commit is contained in:
parent
7f17baa158
commit
c205f585e7
2 changed files with 3 additions and 3 deletions
|
@ -426,7 +426,7 @@ bool MetadataBuilder::Init(const std::vector<BlockDeviceInfo>& block_devices,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool MetadataBuilder::AddGroup(const std::string& group_name, uint64_t maximum_size) {
|
||||
bool MetadataBuilder::AddGroup(std::string_view group_name, uint64_t maximum_size) {
|
||||
if (FindGroup(group_name)) {
|
||||
LERROR << "Group already exists: " << group_name;
|
||||
return false;
|
||||
|
|
|
@ -91,7 +91,7 @@ class PartitionGroup final {
|
|||
friend class MetadataBuilder;
|
||||
|
||||
public:
|
||||
explicit PartitionGroup(const std::string& name, uint64_t maximum_size)
|
||||
explicit PartitionGroup(std::string_view name, uint64_t maximum_size)
|
||||
: name_(name), maximum_size_(maximum_size) {}
|
||||
|
||||
const std::string& name() const { return name_; }
|
||||
|
@ -206,7 +206,7 @@ class MetadataBuilder {
|
|||
// total space used by all partitions in the group.
|
||||
//
|
||||
// This can fail and return false if the group already exists.
|
||||
bool AddGroup(const std::string& group_name, uint64_t maximum_size);
|
||||
bool AddGroup(std::string_view group_name, uint64_t maximum_size);
|
||||
|
||||
// Export metadata so it can be serialized to an image, to disk, or mounted
|
||||
// via device-mapper.
|
||||
|
|
Loading…
Reference in a new issue