summary refs log tree commit diff
path: root/nix/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libutil')
-rw-r--r--nix/libutil/archive.cc2
-rw-r--r--nix/libutil/util.cc2
-rw-r--r--nix/libutil/util.hh7
3 files changed, 2 insertions, 9 deletions
diff --git a/nix/libutil/archive.cc b/nix/libutil/archive.cc
index 6856ea0f28..4e3d99356a 100644
--- a/nix/libutil/archive.cc
+++ b/nix/libutil/archive.cc
@@ -256,7 +256,7 @@ static void parse(ParseSink & sink, Source & source, const Path & path)
                         if (i != names.end()) {
                             printMsg(lvlDebug, format("case collision between `%1%' and `%2%'") % i->first % name);
                             name += caseHackSuffix;
-                            name += int2String(++i->second);
+                            name += std::to_string(++i->second);
                         } else
                             names[name] = 0;
                     }
diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc
index 14026ab829..c07754487e 100644
--- a/nix/libutil/util.cc
+++ b/nix/libutil/util.cc
@@ -433,7 +433,7 @@ Nest::~Nest()
 
 static string escVerbosity(Verbosity level)
 {
-    return int2String((int) level);
+    return std::to_string((int) level);
 }
 
 
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh
index 24e16ba36a..8fa1efbf37 100644
--- a/nix/libutil/util.hh
+++ b/nix/libutil/util.hh
@@ -337,13 +337,6 @@ template<class N> bool string2Int(const string & s, N & n)
     return str && str.get() == EOF;
 }
 
-template<class N> string int2String(N n)
-{
-    std::ostringstream str;
-    str << n;
-    return str.str();
-}
-
 
 /* Return true iff `s' ends in `suffix'. */
 bool hasSuffix(const string & s, const string & suffix);