aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Pflug <tobias.pflug@gmail.com>2020-05-07 18:15:13 +0200
committerTobias Pflug <tobias.pflug@gmail.com>2020-05-07 18:15:13 +0200
commit1f3602a2c9c3bfeea7cc8ee4d478c77dec349206 (patch)
tree0338d842b48c0abb9d871a67f1e4a6a0740093e7
parent987b3d6469f03bff59614bd3b9097df858d07263 (diff)
Remove replaceInSet
The function isn't being used anywhere so it seems safe to remove
-rw-r--r--src/libutil/util.hh11
-rw-r--r--tests/unit-tests/test-util.cc4
2 files changed, 0 insertions, 15 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 1b263abcc..8770add64 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -389,17 +389,6 @@ string replaceStrings(const std::string & s,
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
error string. */
string statusToString(int status);
diff --git a/tests/unit-tests/test-util.cc b/tests/unit-tests/test-util.cc
index 62ca8f11c..e0738614e 100644
--- a/tests/unit-tests/test-util.cc
+++ b/tests/unit-tests/test-util.cc
@@ -364,10 +364,6 @@ namespace nix {
ASSERT_EQ(statusOk(1), false);
}
- /* ----------------------------------------------------------------------------
- * replaceInSet : XXX: this function isn't called anywhere!
- * --------------------------------------------------------------------------*/
-
/* ----------------------------------------------------------------------------
* rewriteStrings