Remove replaceInSet

The function isn't being used anywhere so it seems safe to remove
This commit is contained in:
Tobias Pflug 2020-05-07 18:15:13 +02:00
parent 987b3d6469
commit 1f3602a2c9
2 changed files with 0 additions and 15 deletions

View file

@ -389,17 +389,6 @@ string replaceStrings(const std::string & s,
std::string rewriteStrings(const std::string & s, const StringMap & rewrites); std::string rewriteStrings(const std::string & s, const StringMap & rewrites);
/* If a set contains 'from', remove it and insert 'to'. */
template<typename T>
void replaceInSet(std::set<T> & set, const T & from, const T & to)
{
auto i = set.find(from);
if (i == set.end()) return;
set.erase(i);
set.insert(to);
}
/* Convert the exit status of a child as returned by wait() into an /* Convert the exit status of a child as returned by wait() into an
error string. */ error string. */
string statusToString(int status); string statusToString(int status);

View file

@ -364,10 +364,6 @@ namespace nix {
ASSERT_EQ(statusOk(1), false); ASSERT_EQ(statusOk(1), false);
} }
/* ----------------------------------------------------------------------------
* replaceInSet : XXX: this function isn't called anywhere!
* --------------------------------------------------------------------------*/
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* rewriteStrings * rewriteStrings