diff options
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/archive.cc | 2 | ||||
-rw-r--r-- | src/libutil/util.cc | 2 | ||||
-rw-r--r-- | src/libutil/util.hh | 7 |
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); |