about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-29T12·26+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-29T12·26+0100
commit5c28943e8fd19d7eb55865d45d6dc61336aa04e9 (patch)
tree23027f6e306f2563558643cf5d584394d88429d4 /src/libutil
parent71039becd11f5df4173692508dcb0ad36327c5fa (diff)
int2String() -> std::to_string()
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/archive.cc2
-rw-r--r--src/libutil/util.cc2
-rw-r--r--src/libutil/util.hh7
3 files changed, 2 insertions, 9 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc
index 0187f062b21d..6ee7981432b6 100644
--- a/src/libutil/archive.cc
+++ b/src/libutil/archive.cc
@@ -243,7 +243,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/src/libutil/util.cc b/src/libutil/util.cc
index 11c75d2cda4c..27116fd18297 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -453,7 +453,7 @@ Nest::~Nest()
 
 static string escVerbosity(Verbosity level)
 {
-    return int2String((int) level);
+    return std::to_string((int) level);
 }
 
 
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index a05a4cb88093..038838820899 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -356,13 +356,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);