Config: fix a couple functions not taking string_view args
This commit is contained in:
parent
ff9ccabbee
commit
c34a18da47
2 changed files with 8 additions and 8 deletions
|
@ -194,7 +194,7 @@ void config::append_attributes(const config& cfg)
|
|||
}
|
||||
}
|
||||
|
||||
void config::append_children(const config& cfg, const std::string& key)
|
||||
void config::append_children(const config& cfg, config_key_type key)
|
||||
{
|
||||
for(const config& value : cfg.child_range(key)) {
|
||||
add_child(key, value);
|
||||
|
@ -226,7 +226,7 @@ void config::append(config&& cfg)
|
|||
cfg.clear_attributes();
|
||||
}
|
||||
|
||||
void config::append_children_by_move(config& cfg, const std::string& key)
|
||||
void config::append_children_by_move(config& cfg, config_key_type key)
|
||||
{
|
||||
// DO note this leaves the tags empty in the source config. Not sure if
|
||||
// that should be changed.
|
||||
|
@ -237,7 +237,7 @@ void config::append_children_by_move(config& cfg, const std::string& key)
|
|||
cfg.clear_children_impl(key);
|
||||
}
|
||||
|
||||
void config::merge_children(const std::string& key)
|
||||
void config::merge_children(config_key_type key)
|
||||
{
|
||||
if(child_count(key) < 2) {
|
||||
return;
|
||||
|
@ -252,7 +252,7 @@ void config::merge_children(const std::string& key)
|
|||
add_child(key, std::move(merged_children));
|
||||
}
|
||||
|
||||
void config::merge_children_by_attribute(const std::string& key, const std::string& attribute)
|
||||
void config::merge_children_by_attribute(config_key_type key, config_key_type attribute)
|
||||
{
|
||||
if(child_count(key) < 2) {
|
||||
return;
|
||||
|
|
|
@ -881,10 +881,10 @@ public:
|
|||
/**
|
||||
* Adds children from @a cfg.
|
||||
*/
|
||||
void append_children(const config &cfg, const std::string& key);
|
||||
void append_children(const config &cfg, config_key_type key);
|
||||
|
||||
/** Moves children with the given name from the given config to this one. */
|
||||
void append_children_by_move(config& cfg, const std::string& key);
|
||||
void append_children_by_move(config& cfg, config_key_type key);
|
||||
|
||||
/**
|
||||
* Adds attributes from @a cfg.
|
||||
|
@ -895,14 +895,14 @@ public:
|
|||
* All children with the given key will be merged
|
||||
* into the first element with that key.
|
||||
*/
|
||||
void merge_children(const std::string& key);
|
||||
void merge_children(config_key_type key);
|
||||
|
||||
/**
|
||||
* All children with the given key and with equal values
|
||||
* of the specified attribute will be merged into the
|
||||
* element with that key and that value of the attribute
|
||||
*/
|
||||
void merge_children_by_attribute(const std::string& key, const std::string& attribute);
|
||||
void merge_children_by_attribute(config_key_type key, config_key_type attribute);
|
||||
|
||||
//this is a cheap O(1) operation
|
||||
void swap(config& cfg);
|
||||
|
|
Loading…
Add table
Reference in a new issue