Skip to content

Commit

Permalink
dropEmptyInitThenConcatStringsSep -> concatStringSep: setting value w…
Browse files Browse the repository at this point in the history
…as already harmed

Considering that `value` was probably parsed with tokenizeString
prior, it's unlikely to contain empty strings, and we have no
reason to remove them either.
  • Loading branch information
roberth committed Jul 13, 2024
1 parent 9d18fda commit 05159e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libutil/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ template<> void BaseSetting<Strings>::appendOrSet(Strings newValue, bool append)

template<> std::string BaseSetting<Strings>::to_string() const
{
return dropEmptyInitThenConcatStringsSep(" ", value);
return concatStringsSep(" ", value);
}

template<> StringSet BaseSetting<StringSet>::parse(const std::string & str) const
Expand All @@ -336,7 +336,7 @@ template<> void BaseSetting<StringSet>::appendOrSet(StringSet newValue, bool app

template<> std::string BaseSetting<StringSet>::to_string() const
{
return dropEmptyInitThenConcatStringsSep(" ", value);
return concatStringsSep(" ", value);
}

template<> std::set<ExperimentalFeature> BaseSetting<std::set<ExperimentalFeature>>::parse(const std::string & str) const
Expand Down

0 comments on commit 05159e8

Please sign in to comment.